Handle KorAP-CoNLLU comment metadata (foundry, filename) in case of spacy
Change-Id: I9e41e7369126aaa5a0043dca7e4fc7d8609d750b
diff --git a/my_utils/file_utils.py b/my_utils/file_utils.py
index 4dbe1b4..c5eb8ed 100644
--- a/my_utils/file_utils.py
+++ b/my_utils/file_utils.py
@@ -45,9 +45,9 @@
yield line
-def get_file_annos_chunk(line_generator, chunk_size, token_class, comment_str="###C:"):
+def get_file_annos_chunk(line_generator, chunk_size, token_class, comment_str="###C:", our_foundry="spacy"):
file_has_next = True
- chunk, n_sents = read_conll(line_generator, chunk_size, token_class, comment_str=comment_str)
+ chunk, n_sents = read_conll(line_generator, chunk_size, token_class, comment_str=comment_str, our_foundry=our_foundry)
if n_sents == 0: file_has_next = False
sents, gld, meta = [], [], []
return chunk, file_has_next