You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
1.2 KiB
Python

sentence_kinds = ['affirmative','negative','interrogative_open','interrogative_close']
spoken_stopwords = ['il','lo','la','i','gli', 'le', 'un', 'una','uno','ce','ci','e','con']
open_question_words = ["perchè","perche","perche'",'come','quando','dove','chi','che cosa','cosa', 'quale','o','oppure']
negative_words = ['non','no']
time_terms = ['adesso', 'ormai', 'prima', 'stasera', 'sempre',
'spesso', 'tuttora', 'mai', 'presto', 'tardi', 'oggi',
'domani', 'stamani', 'recentemente', 'successivamente']#dopo,ancora, sempre,
week_days =['lunedi','martedi','mercoledi','giovedi','venerdi','sabato','domenica']
week_days +=[day.replace('i','ì') for day in week_days[:5]]
time_terms += week_days
def extend_words(words):
words += [word[0].upper()+word[1:] for word in words]
words += [word.upper() for word in words]
return words
spoken_stopwords = extend_words(spoken_stopwords)
open_question_words = extend_words(open_question_words)
negative_words = extend_words(negative_words)
time_terms = extend_words(time_terms)
rules = {
'spoken' : {
'max_tokens':15,'valid_tokens':8, 'max_verb_terms':4,'max_subject_terms':4,'max_time_terms':4
},
'gloss' : {'subject':2,'verb':2}
}