text stringlengths 1 93.6k |
|---|
genreCount.append("Languages")
|
else:
|
updatedgenreList.append(["Education / Science / Factual topics","0x90"][useHex]) #Education/Science 0x90
|
genreCount.append("Education / Science / Factual topics")
|
# TVHeadend does not recognize the non-movie genres below. 0xF# are user defined genres per the specification and TVH
|
# does not use them. Kodi does use these user defined values. I could not figure out a way to pass the hex code to TVH
|
# instead of the string to be recoginzed correctly. When TVH is modified to accept a hex value for the genre we can then
|
# use these codes to get correct EPG colored grids. One color for movies with it's separate color and one for TV shows.
|
elif not set(['crime', 'crimedrama', 'detective', 'mystery', 'thriller']).isdisjoint(genreList):
|
updatedgenreList.append(["Detective/Thriller","0xF1"][useHex]) #Detective/Thriller 0xF1
|
genreCount.append("Detective/Thriller")
|
elif not set(['fantasy', 'horror', 'paranormal', 'sciencefiction']).isdisjoint(genreList):
|
updatedgenreList.append(["Science fiction/Fantasy/Horror","0xF3"][useHex]) #Science Fiction/Fantasy/Horror 0xF3
|
genreCount.append("Science fiction/Fantasy/Horror")
|
elif not set(['western','war','military']).isdisjoint(genreList):
|
updatedgenreList.append(["Adventure/Western/War","0xF2"][useHex]) #Adventure/Western/War 0xF2
|
genreCount.append("Adventure/Western/War")
|
elif not set(['comedy', 'comedydrama', 'darkcomedy', 'sitcom']).isdisjoint(genreList):
|
updatedgenreList.append(["Comedy","0xF4"][useHex]) #Comedy 0xF4
|
genreCount.append("Comedy")
|
elif not set(['folk', 'folkloric', 'melodrama', 'music', 'musical', 'musicalcomedy', 'soap']).isdisjoint(genreList):
|
updatedgenreList.append(["Soap/Melodrama/Folkloric","0xF5"][useHex]) #Soap/Melodrama/Folkloric 0xF5
|
genreCount.append("Soap/Melodrama/Folkloric")
|
elif not set(['romance','romanticcomedy']).isdisjoint(genreList):
|
updatedgenreList.append(["Romance","0xF6"][useHex]) #Romance 0xF6
|
genreCount.append("Romance")
|
elif not set(['biography', 'classical', 'classicalreligion', 'docudrama', 'historical', 'historicaldrama', 'religion', 'seriou']).isdisjoint(genreList):
|
updatedgenreList.append(["Serious/Classical/Religious/Historical movie/Drama","0xF7"][useHex]) #Serious/Classical/Religion/Historical 0xF7
|
genreCount.append("Serious/Classical/Religious/Historical movie/Drama")
|
elif not set(['adventure']).isdisjoint(genreList):
|
updatedgenreList.append(["Adventure/Western/War","0xF2"][useHex]) #Adventure/Western/War 0xF2
|
genreCount.append("Adventure/Western/War")
|
elif not set(['drama']).isdisjoint(genreList):
|
updatedgenreList.append(["Movie / Drama","0xF0"][useHex]) #Drama 0xF0
|
genreCount.append("Movie / Drama")
|
return updatedgenreList
|
if userSelectedGenre == '3': #User selected 'original' epg tag
|
for g in EPgenre:
|
genreList.append(g)
|
return genreList
|
# <FILESEP>
|
# coding: utf-8
|
from collections import Counter
|
import glob
|
import re
|
import logging
|
from bs4 import BeautifulSoup
|
import bs4
|
#logging.basicConfig(format='%(levelname)s %(asctime)s:%(message)s', level=logging.INFO)
|
print "Reloaded Ext."
|
logger = logging.getLogger("DeepSequenceClassification")
|
logger.setLevel(logging.INFO)
|
ch = logging.StreamHandler()
|
ch.setLevel(logging.INFO)
|
formatter = logging.Formatter('%(name)s %(levelname)s %(asctime)s:%(message)s')
|
ch.setFormatter(formatter)
|
logger.addHandler(ch)
|
logger.info("Started Logger")
|
class WordToken:
|
START = 0
|
END = 1
|
OOV = 2
|
VOCAB = 3
|
def __init__(self, token_type, value="", b_label="", c_label=""):
|
self.token_type = token_type
|
if self.token_type == WordToken.START:
|
self.word_value = ""
|
self.word_index = WordToken.START
|
self.char_value = "<^>"
|
elif self.token_type == WordToken.END:
|
self.word_value = ""
|
self.word_index = WordToken.END
|
self.char_value = "<$>"
|
else:
|
self.word_value = value.lower()
|
self.char_value = value
|
if self.word_value not in WordToken.word_dict:
|
self.token_type = WordToken.OOV
|
self.word_index = WordToken.OOV
|
else:
|
self.word_index = WordToken.word_dict[self.word_value] + WordToken.VOCAB
|
self.char_seq = [1 + WordToken.char_dict.get(k, -1) for k in self.char_value] # 0 for OOV char
|
self.b_label = b_label
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.