Skip to content
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

[en] replace.txt for British/American words #10770

Open
jaumeortola opened this issue Jul 22, 2024 · 2 comments
Open

[en] replace.txt for British/American words #10770

jaumeortola opened this issue Jul 22, 2024 · 2 comments
Labels

Comments

@jaumeortola
Copy link
Member

(Related to #10721)

There is a file that suggests replacements for American -> British words in the en-GB variant: https://github.com/languagetool-org/languagetool/blob/master/languagetool-language-modules/en/src/main/resources/org/languagetool/rules/en/en-GB/replace.txt

automaker=carmaker
garbage=rubbish

But it works only partially. It works only for words that are allowed by the en-GB speller (garbage, but not automaker).
image

Possible solutions:

  1. Add the American words to the British spelling dictionary.
  2. Give higher priority to the rule EN_GB_SIMPLE_REPLACE_ (prio=-50) so that it is not hidden by MORFOLOGIK_RULE_EN_GB (prio=-10).

@MikeUnwalla @AzadehSafakish @evan-defran-lt

@jaumeortola
Copy link
Member Author

The replacement rule doesn't include inflected forms (movies -> films). We need to add them.
image

@MikeUnwalla
Copy link
Contributor

replace.txt is a crude solution because it does not account for POS. Refer to #10344.

replace.txt does not know about semantics. For example 'garbage' is correct BrE (https://www.ldoceonline.com/dictionary/garbage). We use 'rubbish' (not 'garbage') when the word refers to 'stuff to throw away'. Similar problem with 'stroller', which is a person who is stolling.

I suggest that you review the contents of replace.txt, and remove all entries that can be used in BrE (garbage, stroller, movie,...)

Your option 2 (higher priority for EN_GB_SIMPLE_REPLACE is a safer option than adding the AmE words to the BrE spelling dictionary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants