Skip to content
This repository has been archived by the owner on Aug 15, 2020. It is now read-only.

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
wboag authored Feb 18, 2018
2 parents 331f07a + 3407bfe commit 196654c
Show file tree
Hide file tree
Showing 8 changed files with 184 additions and 202 deletions.
10 changes: 5 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,21 @@ Installation
--------


> pip install -r requirements.txt
$ pip install -r requirements.txt

> wget http://text-machine.cs.uml.edu/cliner/models/silver.model
$ wget http://text-machine.cs.uml.edu/cliner/models/silver.crf

> mv silver.model models/silver.model
$ mv silver.crf models/silver.crf

> cliner predict --txt examples/ex_doc.txt --out data/predictions --model models/silver.model --format i2b2
$ cliner predict --txt examples/ex_doc.txt --out data/predictions --model models/silver.crf --format i2b2


Out-of-the-Box Model
--------

Although i2b2 licensing prevents us from releasing our cliner models trained on i2b2 data, we generated some comparable models from automatically-annotated MIMIC II text.

This silver MIMIC model can be found at http://text-machine.cs.uml.edu/cliner/models/silver.model
This silver MIMIC model can be found at http://text-machine.cs.uml.edu/cliner/models/silver.crf


Example Data
Expand Down
2 changes: 1 addition & 1 deletion code/DatasetCliner_experimental.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def load_dataset(self,avaliable_datasets_sent,avaliable_datasets_labels, dataset
dataset_filepaths : dictionary with keys 'train', 'valid', 'test', 'deploy'
'''
start_time = time.time()
print('Load dataset... ', end='', flush=True)
print('Load dataset... \n')
if parameters['token_pretrained_embedding_filepath'] != '':
if token_to_vector==None:
token_to_vector = hd.load_pretrained_token_embeddings(parameters)
Expand Down
5 changes: 4 additions & 1 deletion code/feature_extraction/word_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ def feature_length(word):
return {('length', ''): len(word)}

def feature_stem_porter(word):
return {('stem_porter', porter_st.stem(word)): 1}
try:
return {('stem_porter', porter_st.stem(word)): 1}
except Exception, e:
return {}

def feature_mitre(word):
features = {}
Expand Down
Loading

0 comments on commit 196654c

Please sign in to comment.