Defining writer for --all
This commit is contained in:
parent
96e61d2f64
commit
2a437b1703
18
wani.py
18
wani.py
|
@ -1047,7 +1047,23 @@ class Formatter:
|
|||
def length(self):
|
||||
return len(self.header_repeat())
|
||||
|
||||
@staticmethod
|
||||
|
||||
class AllFormatter(Formatter):
|
||||
def header_repeat(self):
|
||||
return ["Token_ID", "Word_form", "Lemma", "Msd"]
|
||||
|
||||
def header_right(self):
|
||||
return []
|
||||
|
||||
def content_repeat(self, words, representations, idx):
|
||||
word = words[idx]
|
||||
return [word.id, word.text, word.lemma, word.msd]
|
||||
|
||||
def content_right(self, _freq):
|
||||
return []
|
||||
|
||||
def group(self):
|
||||
return False
|
||||
def make_all_writer(args):
|
||||
return Writer(True, args.all, False, -1, False, False)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user