From 282b1a20967db818d89a3d9dba8224296224e784 Mon Sep 17 00:00:00 2001 From: jeni Shah Date: Fri, 26 Oct 2018 10:21:13 +0530 Subject: [PATCH] phrases scorer documentation --- gensim/models/phrases.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gensim/models/phrases.py b/gensim/models/phrases.py index 9d8a5f5da6..a8d3bf493f 100644 --- a/gensim/models/phrases.py +++ b/gensim/models/phrases.py @@ -676,6 +676,11 @@ def original_scorer(worda_count, wordb_count, bigram_count, len_vocab, min_count corpus_word_count : int Not used in this particular scoring technique. + Returns + ------- + float + Score for given bi-gram, greater than or equal to 0. + Notes ----- Formula: :math:`\\frac{(bigram\_count - min\_count) * len\_vocab }{ (worda\_count * wordb\_count)}`. @@ -703,6 +708,11 @@ def npmi_scorer(worda_count, wordb_count, bigram_count, len_vocab, min_count, co corpus_word_count : int Total number of words in the corpus. + Returns + ------- + float + Score for given bi-gram, in the range -1 to 1. + Notes ----- Formula: :math:`\\frac{ln(prop(word_a, word_b) / (prop(word_a)*prop(word_b)))}{ -ln(prop(word_a, word_b)}`,