Example #1
0
 def _parse(self):
     _Lexicon._parse(self)
     # Map "verschrikkelijk" to adverbial "verschrikkelijke".
     # Combined with negation, this increases accuracy to 79%.
     # A 0.79, P 0.77, R 0.83, F1 0.80, instead of:
     # A 0.75, P 0.72, R 0.82, F1 0.77.
     for w, pos in self.items():
         if "JJ" in pos:
             a = attributive(w)
             if a not in self: 
                 self[a] = { "JJ": pos["JJ"], None: pos["JJ"] }
Example #2
0
 def _parse(self):
     _Lexicon._parse(self)
     # Map "verschrikkelijk" to adverbial "verschrikkelijke".
     # Combined with negation, this increases accuracy to 79%.
     # A 0.75, P 0.72, R 0.82, F1 0.77 becomes:
     # A 0.79, P 0.77, R 0.83, F1 0.80.
     # Accuracy also increases by using exclamation marks as intensifier:
     # A 0.80, P 0.77, R 0.84, F1 0.81.
     for w, pos in self.items():
         if "JJ" in pos:
             a = attributive(w)
             if a not in self:
                 self[a] = {"JJ": pos["JJ"], None: pos["JJ"]}
Example #3
0
 def _parse(self):
     _Lexicon._parse(self)
     # Map "verschrikkelijk" to adverbial "verschrikkelijke".
     # Combined with negation, this increases accuracy to 79%.
     # A 0.75, P 0.72, R 0.82, F1 0.77 becomes:
     # A 0.79, P 0.77, R 0.83, F1 0.80.
     # Accuracy also increases by using exclamation marks as intensifier:
     # A 0.80, P 0.77, R 0.84, F1 0.81.
     for w, pos in self.items():
         if "JJ" in pos:
             a = attributive(w)
             if a not in self: 
                 self[a] = { "JJ": pos["JJ"], None: pos["JJ"] }