diff --git a/example_annotate.py b/example_annotate.py index 81a4d6d2..1df63edc 100644 --- a/example_annotate.py +++ b/example_annotate.py @@ -51,7 +51,7 @@ # get the predictions crf = PyCRFSuite() - crf.tag(dataset, pkg_resources.resource_filename('nalaf.data', 'default_model'), class_id=MUT_CLASS_ID) + crf.tag(dataset, pkg_resources.resource_filename('nalaf.data', 'example_entity_model'), class_id=MUT_CLASS_ID) GNormPlusGeneTagger().tag(dataset, uniprot=True) StubSameSentenceRelationExtractor().tag(dataset) diff --git a/nalaf/data/default_model b/nalaf/data/example_entity_model similarity index 100% rename from nalaf/data/default_model rename to nalaf/data/example_entity_model diff --git a/nalaf/learning/crfsuite.py b/nalaf/learning/crfsuite.py index 3edc6e04..532f5d5e 100644 --- a/nalaf/learning/crfsuite.py +++ b/nalaf/learning/crfsuite.py @@ -54,7 +54,7 @@ def __init__(self, directory, minify=False): warnings.warn('Depricated. Please use PyCRFSuite instead', DeprecationWarning) self.directory = os.path.abspath(directory) """the directory where the CRFSuite executable is located""" - self.model_filename = 'default_model' + self.model_filename = 'example_entity_model' """name to be used for saving the model""" if sys.platform.startswith('linux'): self.crf_suite_call = './crfsuite' @@ -133,7 +133,7 @@ def read_predictions(self, dataset, prediction_file='output.txt', class_id = MUT For example first we would call: * crf.create_input_file(dataset=test, mode='test') - * crf.test(options='-m default_model -i test > output.txt') + * crf.test(options='-m example_entity_model -i test > output.txt') Then we would call: * crf.read_predictions(dataset=test) """ diff --git a/nalaf/learning/taggers.py b/nalaf/learning/taggers.py index 57ada7eb..685f1997 100644 --- a/nalaf/learning/taggers.py +++ b/nalaf/learning/taggers.py @@ -105,7 +105,7 @@ class CRFSuiteTagger(Tagger): :type crf_suite: nalaf.learning.crfsuite.CRFSuite """ - def __init__(self, predicts_classes, crf_suite, model_file='default_model'): + def __init__(self, predicts_classes, crf_suite, model_file='example_entity_model'): super().__init__(predicts_classes) self.crf_suite = crf_suite """an instance of CRFSuite used to actually generate predictions"""