From 96929c5a23debd4caaefd515693f15e06c6b9d9c Mon Sep 17 00:00:00 2001 From: wboag Date: Sun, 15 Nov 2015 15:19:59 -0500 Subject: [PATCH] misc files for build --- cliner/features_dir/read_config.py | 3 --- cliner/notes/note.py | 4 +--- cliner/train.py | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/cliner/features_dir/read_config.py b/cliner/features_dir/read_config.py index 9515e33..105040f 100644 --- a/cliner/features_dir/read_config.py +++ b/cliner/features_dir/read_config.py @@ -45,6 +45,3 @@ def enabled_modules(): return specs - -# Read from config file when module is imported -print enabled_modules() diff --git a/cliner/notes/note.py b/cliner/notes/note.py index 0e333a5..9a78e84 100644 --- a/cliner/notes/note.py +++ b/cliner/notes/note.py @@ -357,8 +357,6 @@ def conlist(self): tmp.append('none') self.concepts.append(tmp) - seen_before = {} - # Use the classifications to correct all mislabled 'none's for classification in self.derived_note.getClassificationTuples(): concept = classification[0] @@ -369,7 +367,7 @@ def conlist(self): data = self.derived_note.getTokenizedSentences() text = self.derived_note.getText() for span in char_spans: - lineno,tokspan = lineno_and_tokspan(line_inds, data, text, span, seen_before) + lineno,tokspan = lineno_and_tokspan(line_inds, data, text, span) start,end = tokspan self.concepts[lineno][start] = concept diff --git a/cliner/train.py b/cliner/train.py index 865705f..7b16d5c 100644 --- a/cliner/train.py +++ b/cliner/train.py @@ -148,7 +148,7 @@ def train(training_list, model_path, format, is_crf=True, grid=False): model.train(notes, grid) # Pickle dump - print 'pickle dump' + print '\nserializing model to %s\n' % model_path with open(model_path, "wb") as m_file: pickle.dump(model, m_file)