Comments (5)
Hi @venzen I can confirm that deepcut cannot do the text correction or spelling correction. You may have to create a function (after OCR) to deal with these corrections before performing the tokenization.
For the second question, I think deepcut should generalized enough to parse new unseen words. However, you can put list of words in the dictionary to cover some cases that you think that it may tokenize wrongly.
Hope this help a bit! Maybe someone can follow this issue too!
from deepcut.
There was a paper for spelling correction by Ekapol and team which may help you quite a bit: https://ieeexplore.ieee.org/document/9145483. I'm not sure if they provide open-source implementation somewhere.
from deepcut.
@titipata Thank you for your response. I started implementing word similarity checking before I saw your reply. Can use difftool.SequenceMatcher()
with a text file of Thai words and find correct spellings.
As you recommend, I then add new words to this file and add it as a deepcut
custom dictionary. For example deepcut was tokenizing 'ความนํา' as ['ความ', 'นํา'] and after adding the word to the custom dictionary it is correctly tokenized as ['ความนํา'].
Thank you, also, for sending the link to the paper about Thai spelling correction. I will read and give feedback if I find a solution.
from deepcut.
Unexpected behavior from deepcut
: I am passing a custom dictionary that contains both the words 'หรือ' and 'อิริยาบถ'. Each word is a separate entry on its own line and without whitespace. There is a newline ('\n') after each entry. So we would expect deepcut
will tokenize each word, correct?
The string is: หรืออิริยาบถน้อย มีคู้เข้า เหยียดออก....
deepcut
fails to segment and returns a single list item for 'หรืออิริยาบถ':
['หรืออิริยาบถ', 'น้อย', ' ', 'มี', ... ]
Any idea what is happening in this case?
EDIT: I should add that my custom dictionary includes 19,000 Thai words. Some of them are compound words. Perhaps this is causing strange behavior.
from deepcut.
The issue was that the custom dictionary contained duplicate words (words also present in the deepcut dictionary). When I made a new blank custom dictionary deepcut works as expected.
from deepcut.
Related Issues (20)
- The URL of the public signing key has changed HOT 1
- Could you explain how to use stopword? HOT 4
- Visualisation of DeepCut's architecture HOT 6
- DeepCut on GPU is slower than on CPU. HOT 1
- Could you please give me some data or just a few lines of data format? HOT 1
- Digital Object Identifier for DeepCut HOT 11
- Pruning model HOT 7
- vocabulary set to empty during tranform method in DeepcutTokenizer
- DeepCut with TF2? HOT 5
- มันไม่ตัดครับ HOT 3
- Questions about access to BEST corpus for class project on deepcut HOT 3
- Upgrade Dockerfile to Tensorflow 2.0 HOT 5
- New installation of latest release fails (via pip) HOT 6
- Problem with 'save_model' attribute HOT 1
- eval data HOT 1
- Getting the indices of the words HOT 4
- After loaded a saved model, DeepcutTokenizer not found function "todense()"
- Problems with numbers
- AttributeError: partially initialized module 'deepcut' has no attribute 'tokenize' HOT 2
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 deepcut.