Skip to content
This repository was archived by the owner on Aug 6, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions source/lib/text_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
FASTBPE = LASER + '/tools-external/fastBPE/fast'
MOSES_BDIR = LASER + '/tools-external/moses-tokenizer/tokenizer/'
MOSES_TOKENIZER = MOSES_BDIR + 'tokenizer.perl -q -no-escape -threads 20 -l '
MOSES_LC = MOSES_BDIR + 'lowercase.perl'
NORM_PUNC = MOSES_BDIR + 'normalize-punctuation.perl -l '
DESCAPE = MOSES_BDIR + 'deescape-special-chars.perl'
REM_NON_PRINT_CHAR = MOSES_BDIR + 'remove-non-printing-char.perl'
Expand Down Expand Up @@ -110,7 +109,7 @@ def Token(inp_fname, out_fname, lang='en',
#
###############################################################################

def BPEfastLoad(line, bpe_codes):
def BPEfastLoad(bpe_codes):
bpe_vocab = bpe_codes.replace('fcodes', 'fvocab')
return fastBPE.fastBPE(bpe_codes, bpe_vocab)

Expand Down
3 changes: 1 addition & 2 deletions source/mine_bitexts.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@

sys.path.append(LASER + '/source')
sys.path.append(LASER + '/source/tools')
from embed import SentenceEncoder, EncodeLoad, EncodeFile, EmbedLoad
from text_processing import Token, BPEfastApply
from embed import EmbedLoad


###############################################################################
Expand Down