Skip to content

Instantly share code, notes, and snippets.

@interrogator
Created May 15, 2016 08:39
Show Gist options
  • Save interrogator/1fd32eade5906846bb93d8961c681d88 to your computer and use it in GitHub Desktop.
Save interrogator/1fd32eade5906846bb93d8961c681d88 to your computer and use it in GitHub Desktop.
from corpkit import *
corpus = corpus('corpus_name')
langmod = corpus.make_language_model('modelname')
# score string
langmod.score('Check similarity for this text to each corpus')
# score file
corpus_file = corpus.subcorpora[5].files[1]
langmod.score(corpus_file)
# check similarity of subcorpora
langmod.compare_subcorpora()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment