We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 002d6ba commit 2a00121Copy full SHA for 2a00121
udapi/block/msf/romance/preprocessor.py
@@ -0,0 +1,21 @@
1
+from phrase import Phrase
2
+from enum import Enum
3
+
4
+class Preprocessor(Phrase):
5
6
7
+ def process_node(self, node):
8
9
+ # In Porttinari treebank, the negative adverb não is not marked with feat Polarity=Neg
10
+ if node.lemma == 'não' and node.upos == 'ADV':
11
+ node.feats['Polarity'] = 'Neg'
12
13
+ if node.upos == 'ADV' and node.feats['PronType'] == 'Neg':
14
+ node.feats['PronType'] = ''
15
16
17
+ # In Romanian RRT treebank, there is no annotation of the voice feature
18
+ # Automatically assign passive voice
19
+ pass_auxes = [x for x in node.children if x.deprel == 'aux:pass']
20
+ if pass_auxes:
21
+ node.feats['Voice'] = 'Pass'
0 commit comments