spacemacs icon indicating copy to clipboard operation
spacemacs copied to clipboard

Spacemacs-based LaTeX document preparation environment with the coding/command completion and human text writing suggestion at the same time.

Open hongyi-zhao opened this issue 3 years ago • 10 comments

On Ubuntu 20.04, I'm using the self-compiled git master version of Emacs and noticed the company-wordfreq.el project which can be used as a human language texts helper based on word frequency dictionaries. Currently, this package is not included in spacemacs. I want to know if I can have a spacemacs-based LaTeX document preparation environment which has the coding/command completion and human text writing suggestion based on the above-mentioned project at the same time.

I've tried some configurations with vanilla Emacs as discussed here, but sill can't figure out the full working configuration.

Any hints will be highly appreciated.

Regards, HY

hongyi-zhao avatar Jun 21 '21 10:06 hongyi-zhao

Send PR if you can. I doubt it's ever useful to sort completions barely according to word frequency.

lebensterben avatar Jun 21 '21 11:06 lebensterben

I haven't figured out how to get them to work together yet. What do you think should be the useful completion technique for human text writing?

hongyi-zhao avatar Jun 22 '21 05:06 hongyi-zhao

Word frequency ignores the contextual information. A useful completion should be based on the context, just like how any other completion works in programming language.

lebensterben avatar Jun 22 '21 05:06 lebensterben

Modern, large scale English word frequency list was first available in 1940s.

Counting the occurrences of word in text corpus at least goes back to Hellenistic period.

Any naive implementation of completion based on word frequency is basically using an ancient technique invented before 0 AD.

lebensterben avatar Jun 22 '21 06:06 lebensterben

According to my experience, the Gmail web client has the feature of the phrase-and-sentence-based semantic completion to some extent.

hongyi-zhao avatar Jun 22 '21 13:06 hongyi-zhao

That's different from the naive word-frequency based completion.

lebensterben avatar Jun 22 '21 15:06 lebensterben

Yes. It's based on AI. Another possible alternative is to call LanguageTool from within Emacs.

hongyi-zhao avatar Jun 22 '21 23:06 hongyi-zhao

See https://github.com/syl20bnr/spacemacs/blob/develop/layers/+tools/languagetool/README.org

lebensterben avatar Jun 23 '21 00:06 lebensterben

I tried the company-mode backend for TabNine. It looks great in a way, as shown below:

image

See here for the corresponding configuration.

hongyi-zhao avatar Jul 02 '21 05:07 hongyi-zhao

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

github-actions[bot] avatar Jul 02 '22 05:07 github-actions[bot]