Skip to content

Commit 32d5c0e

Browse files
committed
Get subword-nmt from PyPI
1 parent 9e37da0 commit 32d5c0e

File tree

3 files changed

+7
-275
lines changed

3 files changed

+7
-275
lines changed

keras_wrapper/dataset.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2030,9 +2030,13 @@ def build_bpe(self, codes, merges=-1, separator=u'@@', vocabulary=None, glossari
20302030
nor concatenated with other subwords.
20312031
:return: None
20322032
"""
2033-
from keras_wrapper.extra.external import BPE
2033+
from subword_nmt.apply_bpe import BPE
20342034
with codecs.open(codes, 'rb', encoding='utf-8') as cods:
2035-
self.BPE = BPE(cods, merges=merges, separator=separator, vocab=vocabulary, glossaries=glossaries)
2035+
self.BPE = BPE(cods,
2036+
merges=merges,
2037+
separator=separator,
2038+
vocab=vocabulary,
2039+
glossaries=glossaries)
20362040
self.BPE_separator = separator
20372041
self.BPE_built = True
20382042

keras_wrapper/extra/external.py

Lines changed: 0 additions & 273 deletions
This file was deleted.

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
'sacremoses',
3333
'sacrebleu',
3434
'scipy',
35+
'subword-nmt',
3536
'future',
3637
'cython',
3738
'keras_applications',

0 commit comments

Comments
 (0)