Comments (7)
from bitextor.
Thanks for your reply.
Today I did an experiment on the sample dictionary (en-ca.dic)
I wrote a bash script to detect the following two regex expression, and then I found a problem described in the following():
tail -n +2 en-ca.dic | sed -r 's/^([^\s]+)\t([^\s]+)$/\2 @ \1/g' > output_s
tail -n +2 en-ca.dic | sed -r 's/^([^\S]+)\t([^\S]+)$/\2 @ \1/g' > output_S
the bash script described as follow (regex_test.sh):
TEST_DIC_NAME=en-ca.dic
tail -n +2
tail -n +2
echo "===================================="
echo "the total lines of the dictionary:"
wc -l ${TEST_DIC_NAME}
echo "===================================="
echo "the s_out_${TEST_DIC_NAME} result:"
echo "total lines containing the @ character:"
grep @ s_out_${TEST_DIC_NAME} | wc -l
echo "total lines not containing the @ character:"
grep -v @ s_out_${TEST_DIC_NAME} | wc -l
echo "===================================="
echo "the S_out_${TEST_DIC_NAME} result:"
echo "total lines containing the @ character:"
grep @ S_out_${TEST_DIC_NAME} | wc -l
echo "total lines not containing the @ character:"
grep -v @ S_out_${TEST_DIC_NAME} | wc -l
Do the above test, and I found that using the following may have better result:
"tail -n +2 en-ca.dic | sed -r 's/^([^\S]+)\t([^\S]+)$/\2 @ \1/g' > output_S "
But I don't konw the reason.
from bitextor.
from bitextor.
Thanks for your reply.
I see what you said, and I also confused about that.
And I do the expriment as you said : replace \s with [:space:] in the en-ca.dic , it really work properly.
But I do the expriment in my own dictionary: en-vi.dic , the result also very bad. I don't know why.
Following are my en-vi.dic file:
from bitextor.
from bitextor.
This is now integrated in master
and 6.x
series branch. Release 6.0.1 incoming. If you find anything else wrong with this new expression, please, reopen the issue. Thanks for all your feedback!
from bitextor.
Thank you very much~
from bitextor.
Related Issues (20)
- Error in rule bicleaner HOT 7
- Install Alcazar HOT 3
- Process completes without error but does not produce any sentence pairs HOT 1
- Urdu sentence alignment HOT 7
- Inconsistent behaviour of paths in .yaml file HOT 1
- How do you compare two different domains HOT 2
- Problem when run bitextor using document aligner NMT HOT 6
- Document aligner happily returns nothing with piped input HOT 1
- Custom Word Tokenizer Error HOT 3
- CMake build failed v8.1.1 HOT 6
- Bitextor crashes if Bicleaner filters all lines
- Hunalign and Bicleaner errors HOT 3
- Bleualign error HOT 4
- custom_translate getting called without externalMT HOT 2
- External embeddings
- Instruction on running bitextor_align_segments.py for Hunalign only? HOT 1
- Only first file in warc file appears to be processed when "directories" is used as data source HOT 4
- New Bicleaner AI full models HOT 1
- Document level granularity of Paracrawl HOT 1
- Bitextor usage HOT 4
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 bitextor.