Comments (3)
Here the complete one :
from pybo import *
issues = ["འཐུང་བུད་", "ཨ་དྷྱིད་ཤུ་ཀ་ར་", "ཀི་བི་ཏི་སྭཱ་", "ལང་ཏང་ཙེ་དང་བྱེ་", "ད་མེད་བྷ་གར་", "རབ་བསྐུས་ནས།",
"གདབ། །ཨོཾ་ན་", "བི་སི་ནི་", "བསྐོལ། །རྡོ་རྗེ་", "བསྐུས་ཤིང་མཉེས་", "སྦོམ་ཞིང་ཆེ་", "བྷ་ག་ཁ་ཆེ་", "།ཨོཾ་གི་རི་ཧི་རི་ཙི་རི། །ཨཱ་ཨཱ་ཤུ་མ་ཤ་", "བཟླས་བྱས་",
"བསྣམས། །རྩི་", "ནཱ་ཤ་", "གནོས་སྨྱོ་བྱེད་བརྗེད་", "གདོད་ཟིན་པ", "བསྲེས་དམར་ནག་", "བརྗེ་ཞིང་བསྐྱར་", "འཆང་མའི།", "དམོད་གཟུག་",
"བཤགས་ན་བུ་", "མཐོལ་མགོ་ལ་", "ཧུ་ཧཾ།", "སྲི་མོ་བཛྲ་ནོ་ཏི་སྟ་ཀཱི་", "གུམ་དང་།", "ཡོལ་གྱིས", "སྐུད་སྣ་", "བཀྲ་མ།", "གདོད་པར་བྱ", "བསྒྲིབས་ཡོངས་སུ་", "དྲངས་ནས།", "རཱུ་ཏྲ་ཀྵ་གནས་",
"ལྡང་པ་ན།", "བསྲུབས་བྱས་པས། །ལྟེ་ལྐོག་", "བསྟུན་ལ་ཉམས་", "ཥ་ཡིག་རྣམ་", "འཛོམ། །རྣོ་", "པྲི་ཡིག་དམར་", "གཏུམ་བྱེད་དང་", "ཞིབ་བས་སྦལ།", "གཅོད་འཁོར་ལོ་", "བཏུལ་མཚམས་བཅད་པ",
"ཞལ་བྷ་ག་", "བསྐུར་ལས་ཀྱི་", "འཁོས་དུ། །ཆེ་", "ནུ་ཧེ་རུ་", "བརྩེགས་རྣམ་པར་", "བྷ་གར་", "ནུ་ཡེ་ཤེས་", "བརྩེགས་ངེས་པ་", "བཟླས་བསྐུལ་གསུང་", "བྷ་གར་འཁྱིལ། །ཨོཾ་",
"བྷ་གར་སྦྱོར་", "བརྒྱུད་སྐུ་གདུང་", "སྒལ་བརྒྱུད་ཞབས་", "བརྩེགས་ཆེ་མཆོག་", "།་གླེན་ལྐུགས་"]
details = ["བུད་", "ཀ་", "ཏི་", "དང་ and དང་", "གར་", "ནས་", "space and །", "སི་", "space and །", "ཤིང་", "ཞིང་", "ག་", "རི་ རི་ ཨཱ་ མ་", "བྱས་",
"space and །", "ཤ་", "བྱེད་", "ཟིན་", "དམར་", "ཞིང་", "མའི།", "གཟུག་", "ན་", "མགོ་", "ཧཾ", "མོ་ སྟ་", "དང་", "གྱིས", "སྣ་", "མ", "པར་", "ཡོངས་", "ནས", "ཀྵ་",
"པ་", "བྱས་ ལྐོག་", "ལ་", "ཡིག་", "space and །", "ཡིག་", "བྱེད་", "བས་", "འཁོར་", "མཚམས་བཅད་", "ག་", "ལས་", "དུ", "ཧེ་", "རྣམ་", "གར་", "ཡེ་", "ངེས་", "བསྐུལ་", "གར་ space and །",
"གར་", "སྐུ་", "བརྒྱུད་", "ཆེ་", "་ before གླེན་"]
tok = BoTokenizer("POS")
for i, b in enumerate(issues):
token = tok.tokenize(b)
result ="".join(t.content for t in token)
print("Missing : %s for %s - Tokeniser output : %s" % (details[i], issues[i], result))
from botok.
I found out that if you change the profile, the issues are different:
Give you an other script to let you understand what I mean:
Here I have change to GMD profile instead of POS
from pybo import *
issues = ["འཐུང་བུད་", "ཨ་དྷྱིད་ཤུ་ཀ་ར་", "ཀི་བི་ཏི་སྭཱ་", "etc...", "ལང་ཏང་ཙེ་དང་བྱེ་", "ད་མེད་བྷ་གར་", "རབ་བསྐུས་ནས།",
"གདབ། །ཨོཾ་ན་", "བི་སི་ནི་", "བསྐོལ། །རྡོ་རྗེ་", "བསྐུས་ཤིང་མཉེས་", "སྦོམ་ཞིང་ཆེ་", "བྷ་ག་ཁ་ཆེ་", "།ཨོཾ་གི་རི་ཧི་རི་ཙི་རི། །ཨཱ་ཨཱ་ཤུ་མ་ཤ་", "བཟླས་བྱས་",
"བསྣམས། །རྩི་", "ནཱ་ཤ་", "གནོས་སྨྱོ་བྱེད་བརྗེད་", "གདོད་ཟིན་པ", "བསྲེས་དམར་ནག་", "བརྗེ་ཞིང་བསྐྱར་", "འཆང་མའི།", "དམོད་གཟུག་",
"བཤགས་ན་བུ་", "མཐོལ་མགོ་ལ་", "ཧུ་ཧཾ།", "སྲི་མོ་བཛྲ་ནོ་ཏི་སྟ་ཀཱི་", "གུམ་དང་།", "ཡོལ་གྱིས", "སྐུད་སྣ་", "བཀྲ་མ།", "གདོད་པར་བྱ", "བསྒྲིབས་ཡོངས་སུ་", "དྲངས་ནས།", "རཱུ་ཏྲ་ཀྵ་གནས་",
"ལྡང་པ་ན།", "བསྲུབས་བྱས་པས། །ལྟེ་ལྐོག་", "བསྟུན་ལ་ཉམས་", "ཥ་ཡིག་རྣམ་", "འཛོམ། །རྣོ་", "པྲི་ཡིག་དམར་", "གཏུམ་བྱེད་དང་", "ཞིབ་བས་སྦལ།", "གཅོད་འཁོར་ལོ་", "བཏུལ་མཚམས་བཅད་པ",
"ཞལ་བྷ་ག་", "བསྐུར་ལས་ཀྱི་", "འཁོས་དུ། །ཆེ་", "ནུ་ཧེ་རུ་", "བརྩེགས་རྣམ་པར་", "བྷ་གར་", "ནུ་ཡེ་ཤེས་", "བརྩེགས་ངེས་པ་", "བཟླས་བསྐུལ་གསུང་", "བྷ་གར་འཁྱིལ། །ཨོཾ་",
"བྷ་གར་སྦྱོར་", "བརྒྱུད་སྐུ་གདུང་", "སྒལ་བརྒྱུད་ཞབས་", "བརྩེགས་ཆེ་མཆོག་", "།་གླེན་ལྐུགས་"]
details = ["Now བུད་ appears", "ཀ་ also", "but with ཏི་, the problem remains", "", "དང་ and དང་", "གར་", "ནས་", "space and །", "སི་", "space and །", "ཤིང་", "ཞིང་", "ག་", "རི་ རི་ ཨཱ་ མ་", "བྱས་",
"space and །", "ཤ་", "བྱེད་", "ཟིན་", "དམར་", "ཞིང་", "མའི།", "གཟུག་", "ན་", "མགོ་", "ཧཾ", "མོ་ སྟ་", "དང་", "གྱིས", "སྣ་", "མ", "པར་", "ཡོངས་", "ནས", "ཀྵ་",
"པ་", "བྱས་ ལྐོག་", "ལ་", "ཡིག་", "space and །", "ཡིག་", "བྱེད་", "བས་", "འཁོར་", "མཚམས་བཅད་", "ག་", "ལས་", "དུ", "ཧེ་", "རྣམ་", "གར་", "ཡེ་", "ངེས་", "བསྐུལ་", "གར་ space and །",
"གར་", "སྐུ་", "བརྒྱུད་", "ཆེ་", "་ before གླེན་"]
tok = BoTokenizer("GMD")
print()
print("Here BoTokenizer uses GMD profile instead of POS, the issues are not the same...")
print()
for i, b in enumerate(issues):
token = tok.tokenize(b)
result ="".join(t.content for t in token)
print("%s for %s - Tokeniser output : %s" % (details[i], issues[i], result))
from botok.
issues are fixed in the 0.2.0 release
from botok.
Related Issues (20)
- Splitting མངས་བས་ wrong?
- Missing English words at the end of the text during sentence tokenization
- 催更帮助文档!
- understanding custom pipelines HOT 3
- dict like `get` method for Token object
- detect any language
- Download of dialect packs fails on macOS when running CI HOT 1
- Why VOWELS constant only has one vowel? HOT 1
- Invalid index in merge rule silently produces uncalled for result.
- Unexpected skip of syllable while tokenizing.
- POS tags ? distinguishing some patterns HOT 2
- identifying weak syllables HOT 1
- issue with Python 3.9
- importing a custom dictionary HOT 1
- syllable tokenizer request
- syllable component
- Missing pos for PUNCT
- `token.text_unaffixed` failed to add tsek
- Can we remove "Loading Trie... (1s.)" message
- [Feature] Classify all PUNCTs into left and right
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 botok.