Skip to content

eronde/suggest-bigram

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

Suggest-bigram

Suggest-bgram is a python library which suggests following words of a given word.

Example

This example contains only dutch words.

  • Suggested word of 'ik' ('I' in english)
    bg = loadDataFromPickle('./dataset/bigram_nl')
    wl = loadDataFromPickle('./dataset/words_nl')
    obj = Gram(bg,wl);
    getFollowingWords = obj.gen_followingWordOf(obj.getIndexOfWord('Ik'))
    print(tuple(getFollowingWords))
Returns:
('heb', 'ben', 'denk', 'wil', 'weet', 'kan', 'hoop', 'was', 'geef', 'doe', 'vind', 'had', 'zal', 'zoek', 'voel', 'verwacht', 'moet', 'zou', 'zie', 'wilde', 'werk', 'probeerde',......)
  • Suggested word of 'kan' ('can' in english)
    getFollowingWords = obj.gen_followingWordOf(obj.getIndexOfWord('kan'))
    print(tuple(getFollowingWords))
Returns:

['je', 'ik', 'worden', 'het', 'de', 'ook', 'hij', 'nu', 'er', 'een', 'zijn', 'u', 'niet', 'dat', 'zich', 'wel', 'nog', 'iedereen', 'gaan', 'die',....]

Licence

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages