acres.word2vec package

Package grouping modules related to the word2vec expansion strategy.

Submodules

acres.word2vec.test module

Module to apply/test a given word2vec model.

acres.word2vec.test.find_candidates(acronym, left_context='', right_context='', min_distance=0.0, max_rank=500)[source]

Similar to robust_find_embeddings, this finds possible expansions of a given acronym.

Parameters
  • acronym (str) –

  • left_context (str) –

  • right_context (str) –

  • min_distance (float) –

  • max_rank (int) –

Return type

Iterator[str]

Returns

acres.word2vec.train module

Trainer for word2vec embeddings based on an idea originally proposed by Johannes Hellrich (https://github.com/JULIELab/hellrich_dh2016).

acres.word2vec.train.train(ngram_size=6, min_count=1, net_size=100, alpha=0.025, sg=1, hs=0, negative=5)[source]

Lazy load a word2vec model.

Parameters
  • ngram_size (int) –

  • min_count (int) –

  • net_size (int) –

  • alpha (float) –

  • sg (int) –

  • hs (int) –

  • negative (int) –

Return type

Word2Vec

Returns