Skip to content

Commit

Permalink
release version 2.2, improve more dependency models
Browse files Browse the repository at this point in the history
  • Loading branch information
huseinzol05 committed Apr 21, 2019
1 parent 655e005 commit f47b6bd
Show file tree
Hide file tree
Showing 33 changed files with 12,264 additions and 7,047 deletions.
Binary file added accuracy/dependency-accuracy.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,084 changes: 1,084 additions & 0 deletions accuracy/models-accuracy.ipynb

Large diffs are not rendered by default.

1,048 changes: 1,048 additions & 0 deletions accuracy/models-accuracy.rst

Large diffs are not rendered by default.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
476 changes: 299 additions & 177 deletions docs/load-dependency.rst

Large diffs are not rendered by default.

270 changes: 135 additions & 135 deletions docs/load-dependency_files/load-dependency_10_0.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
182 changes: 91 additions & 91 deletions docs/load-dependency_files/load-dependency_21_0.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
190 changes: 95 additions & 95 deletions docs/load-dependency_files/load-dependency_27_0.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
190 changes: 95 additions & 95 deletions docs/load-dependency_files/load-dependency_31_0.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/load-dependency_files/load-dependency_44_0.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,064 changes: 1,056 additions & 8 deletions docs/models-accuracy.rst

Large diffs are not rendered by default.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
476 changes: 299 additions & 177 deletions example/dependency/README.rst

Large diffs are not rendered by default.

1,428 changes: 803 additions & 625 deletions example/dependency/load-dependency.ipynb

Large diffs are not rendered by default.

270 changes: 135 additions & 135 deletions example/dependency/load-dependency_files/load-dependency_10_0.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
182 changes: 91 additions & 91 deletions example/dependency/load-dependency_files/load-dependency_21_0.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
190 changes: 95 additions & 95 deletions example/dependency/load-dependency_files/load-dependency_27_0.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
190 changes: 95 additions & 95 deletions example/dependency/load-dependency_files/load-dependency_31_0.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified example/dependency/load-dependency_files/load-dependency_44_0.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions malaya/__init__.py
Expand Up @@ -17,8 +17,8 @@
from pathlib import Path

home = os.path.join(str(Path.home()), 'Malaya')
version = '2.1'
bump_version = '2.1.0'
version = '2.2'
bump_version = '2.2.0'
version_path = os.path.join(home, 'version')


Expand Down
33 changes: 21 additions & 12 deletions malaya/_utils/_paths.py
Expand Up @@ -710,40 +710,49 @@
'crf': {
'model': home + '/dependency/crf/crf-label.pkl',
'depend': home + '/dependency/crf/crf-depend.pkl',
'version': 'v14',
'version': 'v22',
},
'concat': {
'model': home + '/dependency/concat/concat-dependency.pb',
'setting': home + '/dependency/concat/concat-dependency.json',
'version': 'v14',
'version': 'v22',
},
'luong': {
'model': home + '/dependency/luong/luong-dependency.pb',
'setting': home + '/dependency/luong/luong-dependency.json',
'version': 'v14',
'version': 'v22',
},
'bahdanau': {
'model': home + '/dependency/bahdanau/bahdanau-dependency.pb',
'setting': home + '/dependency/bahdanau/bahdanau-dependency.json',
'version': 'v14',
'version': 'v22',
},
'attention-is-all-you-need': {
'model': home + '/dependency/attention/attention-dependency.pb',
'setting': home + '/dependency/attention/attention-dependency.json',
'version': 'v22',
},
}

S3_PATH_DEPEND = {
'crf': {
'model': 'v14/dependency/crf-label.pkl',
'depend': 'v14/dependency/crf-depend.pkl',
'model': 'v22/dependency/crf-label.pkl',
'depend': 'v22/dependency/crf-depend.pkl',
},
'concat': {
'model': 'v14/dependency/concat-dependency.pb',
'setting': 'v14/dependency/concat-dependency.json',
'model': 'v22/dependency/concat-dependency.pb',
'setting': 'v22/dependency/concat-dependency.json',
},
'luong': {
'model': 'v14/dependency/luong-dependency.pb',
'setting': 'v14/dependency/luong-dependency.json',
'model': 'v22/dependency/luong-dependency.pb',
'setting': 'v22/dependency/luong-dependency.json',
},
'bahdanau': {
'model': 'v14/dependency/bahdanau-dependency.pb',
'setting': 'v14/dependency/bahdanau-dependency.json',
'model': 'v22/dependency/bahdanau-dependency.pb',
'setting': 'v22/dependency/bahdanau-dependency.json',
},
'attention-is-all-you-need': {
'model': 'v22/dependency/attention-dependency.pb',
'setting': 'v22/dependency/attention-dependency.json',
},
}
5 changes: 3 additions & 2 deletions malaya/dependency.py
Expand Up @@ -30,7 +30,7 @@ def available_deep_model():
"""
List available deep learning dependency models, ['concat', 'bahdanau', 'luong']
"""
return ['concat', 'bahdanau', 'luong']
return ['concat', 'bahdanau', 'luong', 'attention-is-all-you-need']


def crf(validate = True):
Expand Down Expand Up @@ -77,6 +77,7 @@ def deep_model(model = 'bahdanau', validate = True):
* ``'concat'`` - Concating character and word embedded for BiLSTM.
* ``'bahdanau'`` - Concating character and word embedded including Bahdanau Attention for BiLSTM.
* ``'luong'`` - Concating character and word embedded including Luong Attention for BiLSTM.
* ``'attention-is-all-you-need'`` - Attentions only.
validate: bool, optional (default=True)
if True, malaya will check model availability and download if not available.
Expand All @@ -88,7 +89,7 @@ def deep_model(model = 'bahdanau', validate = True):
raise ValueError('model must be a string')

model = model.lower()
if model in ['concat', 'bahdanau', 'luong']:
if model in ['concat', 'bahdanau', 'luong', 'attention-is-all-you-need']:
if validate:
check_file(PATH_DEPEND[model], S3_PATH_DEPEND[model])
else:
Expand Down

0 comments on commit f47b6bd

Please sign in to comment.