Skip to content

Commit

Permalink
#162 rename model
Browse files Browse the repository at this point in the history
  • Loading branch information
juanmirocks committed Feb 4, 2016
1 parent 30ad803 commit 91f8e4a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion example_annotate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions nalaf/learning/crfsuite.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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)
"""
Expand Down
2 changes: 1 addition & 1 deletion nalaf/learning/taggers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"""
Expand Down

0 comments on commit 91f8e4a

Please sign in to comment.