main_emb.py 431 B

1234567891011121314
  1. from item_embedding.all_lang_emb import item2emb_all
  2. from item_embedding.chinese_emb import item2emb_cn
  3. from item_embedding.eng_emb import item2emb_eng
  4. def main_emb(sentences, lang="all"):
  5. embedings = []
  6. if lang == "all":
  7. embedings = item2emb_all(sentences)
  8. elif lang == "cn":
  9. embedings = item2emb_cn(sentences)
  10. elif lang == "eng":
  11. embedings = item2emb_eng(sentences)
  12. return embedings