Add model version number

This commit is contained in:
Stephan Porada 2020-05-20 15:35:45 +02:00
parent 887e814020
commit 91708308bc

View File

@ -72,9 +72,11 @@ xml_head = '''<?xml version="1.0" encoding="UTF-8"?>\n\
<metadata\n\
spacyVersion="{spacy_version}"
spacyModel="{spacy_model}"
spacyModelVersion="{spacy_model_version}"
md5HashOfInput="{md5_hash}">\n'''.format(md5_hash=md5_hash,
spacy_version=spacy.__version__,
spacy_model=SPACY_MODELS[args.language])
spacy_model=SPACY_MODELS[args.language],
spacy_model_version=nlp.meta['version'])
with open(output_file_original_filename, 'w+') as output_file_original, \
open(output_file_stand_off_filename, 'w+') as output_file_stand_off: