Bug 89578

Summary: EDITING: spellcheck 2-word phrases where 1 word would be wrong if found outside of the phrase
Product: LibreOffice Reporter: Nick Levinson <Nick_Levinson>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: enhancement CC: buzea.bogdan, ilmari.lauhakangas, shantanu.oak
Priority: medium    
Version: 4.2.8.2 release   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=155851
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 96000    

Description Nick Levinson 2015-02-23 01:15:56 UTC
Proposing an improvement to spellchecking: Legal and scholarly writing often includes phrases in which one word is usually wrong unless paired with a certain other word. The spell check should allow such phrases but not allow the usually-wrong word if it's not in the phrase. Spaces could be hard or soft or represented by line breaks. This is consistent with linguistics, which recognizes that a word can have a space within it, because it is grammatically treated like a word that has no internal space.

My hardware description is a guess.

Examples, some in U.S. law:
per se (but "se" alone would still be wrong)
voir dire (but "voir" alone would still be wrong)
stare decisis (but "decisis" alone would still be wrong)
inter alia (but "alia" alone would still be wrong)

Personal and two-word product names could be treated this way, too, especially personal names (such as some in German and Dutch cultures) that include parts with lower-case initials.

I think one approach to programming this would be to let spellchecking identify a wrong word, then retest that word by pairing it with the preceding word to see if it passes the two-word spell check, then, if that fails, retest that wrong word by pairing it with the following word to see if it passes the two-word spell check. Execution would be faster if, when a two-word phrase is added to a dictionary, it's stored in a separate file; and that can be done even though the two-word phrase would be added through the same user interface as are single words. Another would be to include the likely-wrong word in the standard dictionary but conditionally, by adding a flag or code to indicate that it is correct only if a preceding word is also present and another flag to indicate the same thing for a subsequent word.
Comment 1 Buovjaga 2015-02-27 15:06:12 UTC
Sounds reasonable -> NEW.