Algemeen: http://pad.constantvzw.org/p/certainty
Logbook: http://pad.constantvzw.org/p/certainty_logbook
Questions: http://pad.constantvzw.org/p/certainty_questions
Modality paper notes: http://pad.constantvzw.org/public_pad/certainty_notes_Modality-and-Negation

modality.py close reading

---------------------------------------------------------

start

sentence: This automated decision-making is designed to take the human out of the equation.

n = 0.0 (float)
m = 0 (integer)

---------------------------------------------------------

epistemic_weasiling dict

sentence: This automated decision-making is popular belief and of course designed to take the human out of the equation.

prints:

phrase: popular beliefk: -0.75
n: -0.75
m: 2

phrase: of course
k: 1.0
n: 0.25
m: 4

>>> -0.75 + 1.0 / 2 = 0.25
>>> 2 + 2 = 4

---------------------------------------------------------

MODIFIER dict

sentence = 'This strongly hypothesized decision-making is popular belief and of course designed to take the human out of the equation.'

sentence = 'This strongly hypothesize decision-making is popular belief and of course designed to take the human out of the equation.'

<<< hypothesized --> hypothesize
<<< there is no lemmatization on word level in Word(), so hypothesized is not detected in the epistemic 

prints:
*said
i+word+type+weight: 2 Word(u'said/VBD') VB 2
*MODIFIER DETECTED*
word: Word(u'said/VBD')
weight: 3
        (normally a verb has a +2 weight, but +1 from the MODIFIER, as 'hypothesized' is followed by 'strongly', a MODIFIER)
k: 0.25
n: 28.0
m: 231

---------------------------------------------------------

epistemic_type dict

sentence = 'This strongly hypothesize decision-making is popular belief and of course designed to take the human out of the equation.'

i+word+type+weight: 6 Word(u'belief/NN') NN 1
k: -0.25
n: 27.75
m: 232

>>> belief gets another k here as a NN 
>>> 'popular belief' is already rated in the epictemic_weaseling dict
>>> 'belief' is rated twice
>>> all the epistemic_weasling phrases that appear in the other dict's, are rated twice


---------------------------------------------------------

reverse score for negated terms

sentence = 'This strongly said decision-making is popular belief and of course designed to wish and not wish the human out of the equation.'

code:
if i > 0 and s(S[i-1]) in ("not", "n't", "never", "without"):
*k = -k * 0.5

prints:
i+word+type+weight: 12 Word(u'wish/VB') VB 2
former n  : 0.75
weight    : 2
k         : -0.25
weight * k: -0.5
new n     : 0.25
m         : 10

i+word+type+weight: 14 Word(u'not/RB') RB 2

i+word+type+weight: 15 Word(u'wish/VB') VB 2
negated k : 0.125
former n  : 0.25
weight    : 2
k         : 0.125
weight * k: 0.25
new n     : 0.5
m         : 12

---------------------------------------------------------

all words that appear in one of the epistemic dicts

how is m constructed?
>>> an addition of all weights

>>> on what basis are the different weights choosen?
>>> MD = 4, VB = 2, NN = 1, epistemic_weaseling = 2


*epictemic_weaseling dicts
>>> m += 2

phrase: popular belief
k: -0.75
n: -0.75
m: 2

phrase: of course
k: 1.0
n: 0.25
m: 4

*epistemic_type dicts
>>> m += weight

Word(u'said/VBD') VB 2
*MODIFIER DETECTED*
weight: 3
---
former n  : 0.25
weight    : 3
k         : 0.25
weight * k: 0.75
new n     : 1.0
m         : 7

Word(u'belief/NN') NN 1
former n  : 1.0
weight    : 1
k         : -0.25
weight * k: -0.25
new n     : 0.75
m         : 8

Word(u'wish/VB') VB 2
former n  : 0.75
weight    : 2
k         : -0.25
weight * k: -0.5
new n     : 0.25
m         : 10

Word(u'not/RB') RB 2

Word(u'wish/VB') VB 2
negated k : 0.125
former n  : 0.25
weight    : 2
k         : 0.125
weight * k: 0.25
new n     : 0.5
m         : 12

>>> m is a sort of weight? a sum of all the weights?

-------------------------------------------------------

numbers are heavy
(or, and then the numbers are coming)

sentence = 'This strongly said decision-making is popular belief and of course designed to wish and not wish the human out of the two equations.'

>>> what is the reference of this assumption?

Word(u'two/CD') WP 1
CD
former n      : 0.5
new n         : 1.25
m             : 13

-------------------------------------------------------

modality rate calculation

code:
if m == 0:
        print 1.0 # No modal verbs/adverbs used, so statement must be true.
print 'modality rate:', max(-1.0, min(n / (m or 1), +1.0))

prints:
modality rate: 0.0961538461538

n = 1.25
m = 13

min((1.25 / 13), +1.0)
min(0.0961, 1)

>>> algorithm chooses the lowest of the two

max(-1, 0.0961)

>>> algorithm chooses the highest level


-------------------------------------------------------

the words that influence the modality rate:

(strongly)
said
popular belief
belief
of course
two

-------------------------------------------------------

modality.py results (black box results)

sentence     : This strongly said decision-making is popular belief and of course designed to wish and not wish the human out of the two equations.

parsed       : This/DT/O/O/this strongly/RB/B-VP/O/strongly said/VBD/I-VP/O/say decision-making/NN/B-NP/O/decision-making is/VBZ/B-VP/O/be popular/JJ/B-NP/O/popular belief/NN/I-NP/O/belief and/CC/O/O/and of/IN/B-PP/B-PNP/of course/NN/B-NP/I-PNP/course designed/VBN/B-VP/I-PNP/design to/TO/I-VP/O/to wish/VB/I-VP/O/wish and/CC/O/O/and not/RB/B-VP/O/not wish/VB/I-VP/O/wish the/DT/O/O/the human/JJ/B-ADJP/O/human out/IN/B-PP/B-PNP/out of/IN/I-PP/I-PNP/of the/DT/B-NP/I-PNP/the two/CD/I-NP/I-PNP/two equations/NNS/I-NP/I-PNP/equation ././O/O/.

Sentence(s)  : Sentence('This/DT/O/O/this strongly/RB/B-VP/O/strongly said/VBD/I-VP/O/say decision-making/NN/B-NP/O/decision-making is/VBZ/B-VP/O/be popular/JJ/B-NP/O/popular belief/NN/I-NP/O/belief and/CC/O/O/and of/IN/B-PP/B-PNP/of course/NN/B-NP/I-PNP/course designed/VBN/B-VP/I-PNP/design to/TO/I-VP/O/to wish/VB/I-VP/O/wish and/CC/O/O/and not/RB/B-VP/O/not wish/VB/I-VP/O/wish the/DT/O/O/the human/JJ/B-ADJP/O/human out/IN/B-PP/B-PNP/out of/IN/I-PP/I-PNP/of the/DT/B-NP/I-PNP/the two/CD/I-NP/I-PNP/two equations/NNS/I-NP/I-PNP/equation ././O/O/.')

modality rate: 0.0961538461538

>>> RIGHT!

word         : This
modality     : 1.0
-------------
word         : strongly
modality     : 1.0
-------------
word         : said
modality     : 0.25
-------------
word         : decision-making
modality     : 1.0
-------------
word         : is
modality     : 1.0
-------------
word         : popular
modality     : 1.0
-------------
word         : belief
modality     : -0.25
-------------
word         : and
modality     : 1.0
-------------
word         : of
modality     : 1.0
-------------
word         : course
modality     : 1.0
-------------
word         : designed
modality     : 1.0
-------------
word         : to
modality     : 1.0
-------------
word         : wish
modality     : 1.0
-------------
word         : and
modality     : 1.0
-------------
word         : not
modality     : 1.0
-------------
word         : wish
modality     : 1.0
-------------
word         : the
modality     : 1.0
-------------
word         : human
modality     : 1.0
-------------
word         : out
modality     : 1.0
-------------
word         : of
modality     : 1.0
-------------
word         : the
modality     : 1.0
-------------
word         : two
modality     : 0.75
-------------
word         : equations.
modality     : 1.0
-------------