From 90246e005f04310c65c84fcf3ac0f2aac3f498d3 Mon Sep 17 00:00:00 2001 From: Yuval Adam Date: Fri, 6 May 2011 00:13:43 +0300 Subject: added constants and started utils --- consts.py | 5 +++++ utils.py | 12 ++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 consts.py create mode 100644 utils.py diff --git a/consts.py b/consts.py new file mode 100644 index 0000000..a8689f4 --- /dev/null +++ b/consts.py @@ -0,0 +1,5 @@ +# set of sexually explicit nouns +SN = ['ass', 'boobs', 'cock', 'crotch', 'cunt', 'dick'] + +# set of sexually explicit nouns that are likely targets for euphemism +SN_ = SN diff --git a/utils.py b/utils.py new file mode 100644 index 0000000..c5e020f --- /dev/null +++ b/utils.py @@ -0,0 +1,12 @@ +from consts import SN, SN_ + +def NS(n): + """Noun sexiness function + Returns a real value measure of the maximum similarity a noun `n not in SN` + has to each of the `nouns in SN_` + """ + for noun in SN_: + acv = () + # let acv be the vector of absolute frequencies of each adjective that + # modifies the noun in the union of the erotica and Brown corpora + return 0 -- cgit v1.3.1