Bug 118399 - Word Completion should collect any string regardless of correctness according to spellchecker
Summary: Word Completion should collect any string regardless of correctness according...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsDevAdvice
Depends on:
Blocks: AutoCorrect-Complete
  Show dependency treegraph
 
Reported: 2018-06-26 17:22 UTC by Sophie Freud
Modified: 2018-08-29 18:26 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sophie Freud 2018-06-26 17:22:25 UTC
Description:
Write's Word Completion doesn't capture a word if it starts with the pound/hash symbol (#). It would be useful because hashtags (e.g. #todayilearned) are very popular nowadays.

If the behavior is the same in the case of other special symbols as well, then I propose removing this barrier altogether, so that every string can be captured.

Optionally, there could be a setting so that the user can modify which starting characters render a word uncapturable by the Word Completion list.

Steps to Reproduce:
(see Description)

Actual Results:
(see Description)

Expected Results:
(see Description)


Reproducible: Always


User Profile Reset: No


OpenGL enabled: Yes

Additional Info:
Comment 1 Buovjaga 2018-07-13 15:52:58 UTC
What is the trick to making this work (with words not starting with special chars)? I tried and failed. Please give exact steps.

Set to NEEDINFO.
Change back to UNCONFIRMED after you have provided the information.
Comment 2 Sophie Freud 2018-07-13 16:07:12 UTC
(In reply to Buovjaga from comment #1)
> What is the trick to making this work (with words not starting with special
> chars)? I tried and failed. Please give exact steps.
> 
> Set to NEEDINFO.
> Change back to UNCONFIRMED after you have provided the information.

@Buovjaga, although this is not the place to discuss it, first you need to turn it on (Tools > AutoCorrect > tick "While typing". Then in the same menu, a few lines lower, open "AutoCorrect Options...". Go to the Word Completion tab. Tick "Enable w.c.", "Show as tip" and "Collect words". Make sure Min. length is short enough for you and Max. entries is great enough. Use the document. Unfortunately, the word list will be separate for each document. Keep everything you write in the document (it will try to complete words based on present ones), or if you need to delete, try to keep the document open as long as possible (because for now collected words are lost if they are removed from your text and you close the document).
Comment 3 Buovjaga 2018-07-13 18:04:50 UTC
Thanks and this is absolutely the place to discuss it because reports need to have clear steps - references to features are not enough.

The problem for me (and apparently the actual root problem here) was that I tried with "todayilearned" and its #-version and neither was saved. Welp, luckily I happened to try with a real Finnish word as the default document language was Finnish and it worked!

I did a new test from scratch with English (USA) for the document language, but "todayilearned" was still not captured. I tried with a real English word "completion" and it was captured.

So in essence your suggestion is: capture any word, even though your language dictionary considers it nonsense. Delegating to UX team.

Tested with
Arch Linux 64-bit
Version: 6.2.0.0.alpha0+
Build ID: bd394492c165d27c96a44495d9ca694a242acb8f
CPU threads: 8; OS: Linux 4.17; UI render: default; VCL: gtk3; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group threaded
Built on July 11th 2018
Comment 4 Heiko Tietze 2018-07-23 10:44:44 UTC
Issue here is that non-standard characters like # or _ are not taken into the auto completion but stripped off. You can type tipof... and add the hashtag later. 

If we don't strip, punctuation marks, numbers etc. I suspect we run into much more troubles.

Examples: "#myhashtag" = myhashtag, "100%-reliability" = reliability, but "year1980" = year1980

My take is to keep autocompletion as it is but introduce editing capabilities and permanency for the list, which should be two new tickets. Other opinions?
Comment 5 Roman Kuznetsov 2018-07-30 12:57:03 UTC
(In reply to Heiko Tietze from comment #4)

> My take is to keep autocompletion as it is but introduce editing
> capabilities and permanency for the list, which should be two new tickets.


I agree
Comment 6 Cor Nouws 2018-08-08 08:42:02 UTC
(In reply to Buovjaga from comment #3)

> So in essence your suggestion is: capture any word, even though your
> language dictionary considers it nonsense. Delegating to UX team.

It does capture any word, if you turn off Automatic Spell Checking

(In reply to Heiko Tietze from comment #4)
> Issue here is that non-standard characters like # or _ are not taken into
> the auto completion but stripped off. You can type tipof... and add the
> hashtag later. 

It would definitely be possible to add exceptions for special characters that should be included/start/tailing. If it's worth, is always hard to say.

> My take is to keep autocompletion 

Word Completion

> as it is but introduce editing capabilities 

and this would be an option that works too. But if one starts editing a list, then one can also use AutoCorrect > Replace..

>  and permanency for the list, 

Permanency cross session, or only cross document? The latter should work if there is no tick in the fifth checkbox.
Comment 7 Sophie Freud 2018-08-08 15:05:02 UTC
(In reply to Cor Nouws from comment #6)

> It would definitely be possible to add exceptions for special characters
> that should be included/start/tailing. If it's worth, is always hard to say.

Let the user decide which characters to include. Then you can't go wrong.

> and this would be an option that works too. But if one starts editing a
> list, then one can also use AutoCorrect > Replace..

I disagree. "Replace" ad "Word Completion" serve two very distinct purposes.

> Permanency cross session, or only cross document? The latter should work if
> there is no tick in the fifth checkbox.

Both are desirable. But even cross-session permanency doesn't work right now: https://bugs.documentfoundation.org/show_bug.cgi?id=118309
Comment 8 Cor Nouws 2018-08-29 17:52:18 UTC
(In reply to Sophie Freud from comment #7)
> (In reply to Cor Nouws from comment #6)
> 
> > It would definitely be possible to add exceptions for special characters
> > that should be included/start/tailing. If it's worth, is always hard to say.
> 
> Let the user decide which characters to include. Then you can't go wrong.

What would you propose for the way in which a user can do that?


> > and this would be an option that works too. But if one starts editing a
> > list, then one can also use AutoCorrect > Replace..
> 
> I disagree. "Replace" ad "Word Completion" serve two very distinct purposes.

To a certain level, yes. But if you have to edit the word-completion list manually, the difference gets smaller ;)

> > Permanency cross session, or only cross document? The latter should work if
> > there is no tick in the fifth checkbox.
> 
> Both are desirable. But even cross-session permanency doesn't work right
> now: https://bugs.documentfoundation.org/show_bug.cgi?id=118309

see my comment there.
Thanks a lot! - Cor
Comment 9 Sophie Freud 2018-08-29 18:22:57 UTC
(In reply to Cor Nouws from comment #8)
> (In reply to Sophie Freud from comment #7)
> > Let the user decide which characters to include. Then you can't go wrong.
> 
> What would you propose for the way in which a user can do that?

Have a textbox in the settings into which the user can enter the characters. Each character gets added to the "whitelist" with which collectable strings can begin.(Some characters should obviously be unallowed and autodeleted when typed into the textbox, like space, tab, etc.).

> 
> > > and this would be an option that works too. But if one starts editing a
> > > list, then one can also use AutoCorrect > Replace..
> > 
> > I disagree. "Replace" ad "Word Completion" serve two very distinct purposes.
> 
> To a certain level, yes. But if you have to edit the word-completion list
> manually, the difference gets smaller ;)
> 

True. Not sure what you're getting at, but if it takes us closer to solving these problems, then by all means :)
Comment 10 Heiko Tietze 2018-08-29 18:26:18 UTC
There seems to be some concerns about accepting all characters. So here is my take again. 

(In reply to Heiko Tietze from comment #4)
> My take is to keep autocompletion as it is but introduce editing
> capabilities and permanency for the list, which should be two new tickets.

Keeping the ticket open for further discussion and dev advice.