Commit f21b65cb authored by delanoe's avatar delanoe

Merge remote-tracking branch 'origin/romain-testing' into testing

parents 54cc73b1 75ed079e
......@@ -34,14 +34,14 @@ def add_lang(hyperdata, observed_languages, skipped_languages):
'doc_error': None # str
if "language_iso2" in hyperdata.keys():
if "language_iso2" in hyperdata and hyperdata["language_iso2"]:
lang = hyperdata["language_iso2"]
if lang not in LANGUAGES.keys():
lang_result['skipped'].append(lang) # FIXME: perhaps better to do this at ngrams_extraction
elif "language_iso3" in hyperdata.keys():
elif "language_iso3" in hyperdata and hyperdata["language_iso3"]:
lang = languages[hyperdata["language_iso3"]].iso2
......@@ -54,7 +54,7 @@ def add_lang(hyperdata, observed_languages, skipped_languages):
print ("LANG not referenced", hyperdata["language_iso3"])
elif "language_name" in hyperdata.keys():
elif "language_name" in hyperdata and hyperdata["language_name"]:
lang = languages[hyperdata["language_name"]].iso2
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment