Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

my_find_synonim.py 500 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
  1. from gensim.models import KeyedVectors as word2vec
  2. from argparse import ArgumentParser
  3. def arguments_parser():
  4. parser = ArgumentParser()
  5. parser.add_argument("--label", dest="label",
  6. help="label str to work with", required=True)
  7. return parser
  8. args = arguments_parser().parse_args()
  9. vectors_text_path = 'models/my_first_model/targets.txt'
  10. model = word2vec.load_word2vec_format(vectors_text_path, binary=False)
  11. print(model.most_similar(positive=[args.label]))
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...