forked from kristjan/cjvt-srl-tagging
testing new config
This commit is contained in:
@@ -4,6 +4,7 @@ from parser.msd.msdmap import Msdmap
|
||||
import pickle
|
||||
from pathlib import Path
|
||||
from fillpred_model.step1 import build_model_row
|
||||
import sys
|
||||
|
||||
class Parser:
|
||||
# reads a TEI xml file and returns a dictionary:
|
||||
@@ -18,8 +19,12 @@ class Parser:
|
||||
self.W_TAGS = ['w']
|
||||
self.C_TAGS = ['c']
|
||||
self.S_TAGS = ['S', 'pc']
|
||||
with Path("./fillpred_model/model.pickle").open("rb") as fp:
|
||||
try:
|
||||
fp = Path("./fillpred_model/model.pickle").open("rb")
|
||||
self.fillpred_model = pickle.load(fp)
|
||||
except IOError:
|
||||
print("Generate the model first: $ make tools/fillpred_mode/model.pickle")
|
||||
sys.exit(1)
|
||||
|
||||
def parse_tei(self, filepath):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user