Exemple #1
0
 def __init__(self, lang='en'):
     self._obj = clg.dictionary_create_lang(lang)
     if not self._obj:
         # We should get the error message from the library.
         raise LG_DictionaryError('Error: Failed to open dictionary {!r}'.format(lang))
Exemple #2
0
def set_opts():
    """
    Настройка параметров парсера
    """
    clg.parse_options_set_max_null_count(parse_opts,6)
    clg.parse_options_set_display_morphology(parse_opts,0)
    clg.parse_options_set_islands_ok(parse_opts, True)
    clg.parse_options_set_linkage_limit(parse_opts,10)
    clg.parse_options_set_disjunct_cost(parse_opts, 2)

def main():
    with open('333333.txt', 'r') as file:
        for line in file:
            vword.append(line[:-1])
    set_opts()
    app = QtWidgets.QApplication(sys.argv)
    window = App()
    window.show()
    app.exec_()

vword = []
lang_dict = clg.dictionary_create_lang("ru")
parse_opts = clg.parse_options_create()
morph = pymorphy2.MorphAnalyzer()
sc = SparkContext()
sqlContext = SQLContext(sc)

if __name__ == '__main__':
    main()
Exemple #3
0
 def __init__(self, lang='en'):
     self._obj = clg.dictionary_create_lang(lang)
     if not self._obj:
         # We should get the error message from the library.
         raise LG_DictionaryError('Error: Failed to open dictionary {!r}'.format(lang))
Exemple #4
0
 def __init__(self, lang='en'):
     self._obj = clg.dictionary_create_lang(lang)