summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuval Adam <yuv.adm@gmail.com>2011-05-06 01:29:39 +0300
committerYuval Adam <yuv.adm@gmail.com>2011-05-06 01:29:39 +0300
commit617aab964ad78a0be5fbbc08531aee0e84cf7fcf (patch)
treeac5fdfaea20acf83dd1951a966e5509c82e9c7bf
parent81abdcb8d014bedd8c9668ef637afae561dd9b1c (diff)
some docstring updates
-rw-r--r--utils.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/utils.py b/utils.py
index 95a991c..c9a3da9 100644
--- a/utils.py
+++ b/utils.py
@@ -1,12 +1,14 @@
from brown import brown_collection
from consts import SN, SN_
+MIN_NS = 10**-7
+
def NS(noun):
"""Noun sexiness function
Returns a real value measure of the maximum similarity
a `noun` not in SN has to each noun in SN_
"""
- # return 10**-7 for nouns that occur less than 200 times
+ # return MIN_NS for nouns that occur less than 200 times
return brown_collection.tf_idf(noun, SN_)
def AS(adj):
@@ -20,7 +22,7 @@ def AS(adj):
return 0
def VS(verb):
- """Verb sexines function
+ """Verb sexiness function
Returns a real value measure of how much more likely a verb
phrase `verb` is to appear in an erotic context than a
nonerotic one