Skip to content

Commit

Permalink
fixed a bug, output object is different from expected when feature ty…
Browse files Browse the repository at this point in the history
…pe is word
  • Loading branch information
Kensuke-Mitsuzawa committed Nov 6, 2017
1 parent 5f4e60f commit 50613f1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions DocumentFeatureSelection/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,9 +409,13 @@ def get_word(self, row_col_val_tuple:ROW_COL_VAL, vocabulary:Dict[int,str])->Uni
vocab = vocabulary[row_col_val_tuple.col]
try:
feature_object = json.loads(vocab)
if len(feature_object)==1:
# When feature is word, the length is 1 #
feature_object = feature_object[0]
except:
feature_object = vocab


return feature_object

def initialize_cache_dict_object(self, cache_backend:str, file_name:str, path_cache_file=mkdtemp()):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""

__author__ = 'kensuke-mi'
__version__ = '1.4'
__version__ = '1.4.1'

import sys
print('python version {}'.format(sys.version_info))
Expand Down

0 comments on commit 50613f1

Please sign in to comment.