Comments (4)
The string "url " does not match the if sentence. If you test this in bash
it will return 1:
echo "url " | grep '\s' | wc -l
I think the "if" is working as intended (but it could be coded in a better way).
from bitextor.
The command you provided return 1, that is to say it matches; in other words, it indicate that the "url " contains the '\s' character (Null character) and the grep command can find it and have one return ; and in line 888 of the bitextor.sh script, the logical meaing is : if the command $(echo $line | grep '\s' | wc -l) return 0, that means the $line doesn't meet the correct format(In other words, if it return 1,that is to say it meet the correct format, but "url " isn't the correct format but it also will return 1).
from bitextor.
The example "url " has a correct format. The expression matches because the format is the one we expect: data TAB data
. I agree with you that data in the fields are not right, because the second field is empty in our example (field 1: url
, fields 2: ""
. But we are not checking the fields data here, we are only checking format, and, again, the format is correct, so the 'if' works as intended.
If you are worried about the fields content, I want you to know that they are checked and managed in the Python scrips, raising exceptions if a path or URL is not right. Again, in our example, it will raise an exception saying that the ETT is empty or not found.
Thanks for your feedback and don't hesitate to ask or make a pull request anytime.
from bitextor.
Oh, I see. Thanks 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.