-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decoding in text files (character reference entities) #32
Comments
Thanks Alan, Excluding
(I ran this in a snapshot taken in July before scripts and google docs documents were added.) It is possible that some of these occurrences are correct, e.g. in technical material. However, it will be too much work to check each context. A global replace as part of the automatic pre-processing is the way forward. |
Just to mention that I did a good bit of searching to try to find out what |
Great. I'm inclined to agree that a global replace is the optimal solution. TLDR;
The 2 occurrences are in Paracrawl(v4) which is currently not included in training (it’s on the exclude list in ‘gdrive_filelist.csv’) but still worth handling it since we're aware of it. I also had a look at All other CREs listed above are valid and can be replaced with their equivalent character. |
Thanks for throwing another pair of eyes on it.
Do you mean Technical note: Replace "valid CRE" with "pre-defined CRE". Data providers may have had their own entities defined in custom DTD files. Such DTDs can be referenced in a document's |
This is the training file used for the first |
Sorry I should have typed |
Thanks to Joachim for pointing this issue out and providing the command line.
There are decoding issues with some (approx 65,000) characters in plaintext files.
Searching through text files for regex
[&][#0-9a-zA-Z]+[;]
yields the counts and matched strings listed below.(RegEx reminder
[&][#0-9a-zA-Z]+[;]
is any string beginning with & followed by one or more # or alphanumeric and ending in ; )Note that some/many/all of these strings may be in files that are on the exclude list of Irish_Data/gdrive_filelist.csv so could potentially be ignored. Assuming the strings should be replaced by the correct character in the first instance, further investigation and action is required.
find Irish_Data -type f | fgrep -v .tmx | xargs grep -h -o -E "[&][#0-9a-zA-Z]+[;]" | sort | uniq -c
39 �
125 |
1 é
1 ú
8 &
1854 [
1828 ]
176 ‘
174 ’
1 “
1 ”
1 á
2 &Dodgers;
1 á
26840 &
15743 '
4 &c;
85 >
59 <
35
18510 "
The text was updated successfully, but these errors were encountered: