Comments (2)
technically, you can just concatenate the two BPE files (called codes_file
in the README), and this should achieve your desired result. I've done this back in 2015 to combine Cyrillic and Latin merge operations for Russian. Two things to pay attention to:
- the first line of the file gives some version info. You can remove this from the 2nd file that you concatenate to the first.
- the order of the files matters, since you will get different segmentations depending on the order of merge operations.
- if there's Latin alphabet text in the Japanese file, there is a chance that the English tokenization changes in rare cases. To prevent this, you'd have to only use the first 32000 merge operations for English text.
from subword-nmt.
technically, you can just concatenate the two BPE files (called
codes_file
in the README), and this should achieve your desired result. I've done this back in 2015 to combine Cyrillic and Latin merge operations for Russian. Two things to pay attention to:
- the first line of the file gives some version info. You can remove this from the 2nd file that you concatenate to the first.
- the order of the files matters, since you will get different segmentations depending on the order of merge operations.
- if there's Latin alphabet text in the Japanese file, there is a chance that the English tokenization changes in rare cases. To prevent this, you'd have to only use the first 32000 merge operations for English text.
Thank you very much!
from subword-nmt.
Related Issues (20)
- subword-nmt HOT 3
- learn_bpe.py error HOT 1
- learn_joint_bpe_and_vocab.py for Japanese HOT 1
- BPE-Dropout question HOT 1
- Recover back code file HOT 1
- DeprecationWarning and ResourceWarning: Enable tracemalloc to get the object allocation traceback HOT 2
- No module named apply_bpe HOT 4
- About the vocabulary size HOT 2
- Readme update please HOT 1
- Question about vocabulary filter HOT 2
- Unknown word and vocabulary filter HOT 2
- How to avoid special char like '\t' being split by bpe HOT 3
- applying BPE(Byte Pair Encoding) fails for large Chinese data tokenized with THULAC HOT 1
- Error: invalid line 2 in BPE codes file when running apply_bpe.py HOT 1
- How to decode BPE when applied to machine translation HOT 1
- learn_bpe.py code question HOT 1
- BrokenPipeError: [Errno 32] Broken pipe HOT 3
- How to find all valid BPEs for a word? HOT 3
- AttributeError: 'BPE' object has no attribute 'glossaries_regex' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from subword-nmt.