def do(lang, only, sql, **kwargs): if '-' not in lang: targets = [ ('entry', make_entry), ('form', make_form), ('importance', make_importance), ] attach = [] else: (from_lang, to_lang) = lang.split('-') targets = [ ('translation', make_translation), ] attach = [ "'dictionaries/processed/%s.sqlite3' AS lang" % (from_lang), "'dictionaries/processed/%s.sqlite3' AS other_lang" % (to_lang), ] make_targets( lang, in_path='raw', out_path='processed', targets=targets, attach=attach, only=only, sql=sql, )
def do(lang, only, sql, **kwargs): if "-" not in lang: targets = [ ("entry", make_entry), ("inflection_table", make_inflection_table), ("form", make_form), ("importance", make_importance), ] attach = [] else: (from_lang, to_lang) = lang.split("-") targets = [ ("translation", make_translation), ] attach = [ "'dictionaries/processed/%s.sqlite3' AS lang" % (from_lang), "'dictionaries/processed/%s.sqlite3' AS other_lang" % (to_lang), ] make_targets( lang, in_path="raw", out_path="processed", targets=targets, attach=attach, only=only, sql=sql, )
def do(lang, sql, **kwargs): (from_lang, _) = lang.split('-') targets = [ ('collect', collect), ] make_targets( lang, in_path='processed', out_path='infer.sqlite3', targets=targets, attach=["'dictionaries/processed/%s.sqlite3' AS lang" % from_lang], sql=sql, )
def do(lang, sql, **kwargs): (from_lang, _) = lang.split("-") targets = [ ("collect", collect), ] make_targets( lang, in_path="processed", out_path="infer.sqlite3", targets=targets, attach=["'dictionaries/processed/%s.sqlite3' AS lang" % from_lang], sql=sql, )
def do(lang, sql, only, **kwargs): assert "-" in lang, "No generic processing step for single lang" from_lang, _ = lang.split("-") targets = [ ("translation", translation), ("simple_translation", simple_translation), ] make_targets( lang, in_path="processed", out_path="generic", targets=targets, attach=[ "'dictionaries/infer.sqlite3' AS infer", "'dictionaries/processed/%s.sqlite3' AS lang" % (from_lang), ], sql=sql, only=only, )
def do(lang, sql, only, **kwargs): assert '-' in lang, 'No generic processing step for single lang' from_lang, _ = lang.split('-') targets = [ ('translation', translation), ('simple_translation', simple_translation), ] make_targets( lang, in_path='processed', out_path='generic', targets=targets, attach=[ "'dictionaries/infer.sqlite3' AS infer", "'dictionaries/processed/%s.sqlite3' AS lang" % (from_lang), ], sql=sql, only=only, )
def do(lang, only, sql, **kwargs): if "-" not in lang: attach = [] targets = [ ("vocable", make_vocable), ("display", make_display), ("entry", make_entry), ("vacuum", vacuum), ] in_path = "processed" else: (from_lang, to_lang) = lang.split("-") attach = [ "'dictionaries/generic/%s-%s.sqlite3' AS other_pair" % (to_lang, from_lang), "'dictionaries/processed/%s.sqlite3' AS lang" % (from_lang), "'dictionaries/processed/%s.sqlite3' AS other" % (to_lang), "'dictionaries/wdweb/wikdict.sqlite3' AS wikdict", ] targets = [ ("translation", make_translation), ("simple_translation", make_simple_translation), ("search_index", make_search_index), ("translation_block", make_translation_block), ("search_by_form", make_search_by_form), ("vacuum", vacuum), ("stats", update_stats), ] in_path = "generic" make_targets( lang, in_path=in_path, out_path="wdweb", attach=attach, targets=targets, only=only, sql=sql, )
def do(lang, only, sql, **kwargs): if '-' not in lang: attach = [] targets = [ ('vocable', make_vocable), ('display', make_display), ('entry', make_entry), ('vacuum', vacuum), ] in_path = 'processed' else: (from_lang, to_lang) = lang.split('-') attach = [ "'dictionaries/generic/%s-%s.sqlite3' AS other_pair" % (to_lang, from_lang), "'dictionaries/processed/%s.sqlite3' AS lang" % (from_lang), "'dictionaries/processed/%s.sqlite3' AS other" % (to_lang), "'dictionaries/wdweb/wikdict.sqlite3' AS wikdict", ] targets = [ ('translation', make_translation), ('simple_translation', make_simple_translation), ('search_index', make_search_index), ('vacuum', vacuum), ('stats', update_stats), ] in_path = 'generic' make_targets( lang, in_path=in_path, out_path='wdweb', attach=attach, targets=targets, only=only, sql=sql, )