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

Hunspell format and multiple dictionary files #25

Closed
joshinils opened this issue Jun 15, 2020 · 11 comments
Closed

Hunspell format and multiple dictionary files #25

joshinils opened this issue Jun 15, 2020 · 11 comments
Labels

Comments

@joshinils
Copy link

What should go in there?
i have no clue what to put in there, i tried
"german",
"/usr/share/hunspell/de_DE_frami.dic",
"/usr/share/hunspell/de_DE_frami",
"de_DE_frami",
"de-DE",
"de"

Also, what kind of file does this expect? where should that go, or where does it look?

@yzhang-gh
Copy link
Owner

Thanks for the question. It also took me a while to recall how those settings work.

You have two places to store your "user dictionary",

  • either C:\Users\<username>\AppData\Roaming\Code\User\wordlist (you can open it with command open user dictionary)
  • or inside the settings.json (i.e. userDictionary, a list of words for completion).
    (If you have disabled the useExternalUserDictFile option.)

@joshinils
Copy link
Author

joshinils commented Jun 16, 2020

on linux that's /home/<username>/.config/Code/User/wordlist

setting a symbolic link to /usr/share/hunspell/de_DE_frami.dic does indeed give me a whole lot of words, but it doesn't recognize the format of the dictionary files (i guess I've only linked to one of them), it also doesnt recognize any umlauts (üöä) in the given file, but i guess that is to be expected.
creating a custom file with words that contain umlauts it handles it fine.

I'd be quite happy to see support for this hunspell format. And I'd also like to see support for multiple dictionaries to be active at the same time (like english and german for example)
otherwise I can't use the dictionary files i already have, I'd have to "compile"/find new ones just for this.

i.e. install hunspell-toolsl, and unmunch my dictionary file, though with this utf (utf8, somehow it doesnt recognize utf for me) encoding, otherwise all umlauts and ß are gone.

@yzhang-gh
Copy link
Owner

Thanks. So I think there are two features

  • Support the hunspell format while still be compatible with our current file. (It looks quite simple.)
  • Support multiple dictionary files
    • Would you think having both German and English words in the suggestion is a bit messy sometimes?
    • We can also go further thinking about multiple language support (Multi language support possible ? #1). Then we better to offer an option to choose which language(s) to enable (e.g. using an array like ["en", ...]).

@yzhang-gh yzhang-gh changed the title [question] what to put into "dictCompletion.userDictionary" options field Hunspell format and multiple dictionary files Jun 16, 2020
@joshinils
Copy link
Author

regarding the messiness; nah, i like to add english comments into german latex files. i kinda always use english for comments, even if anyone ever reading the thing i type knows german.

@yzhang-gh
Copy link
Owner

Then it will be easier to implement. Thanks for the information.

yzhang-gh pushed a commit that referenced this issue Jun 20, 2020
supports hunspell format
@yzhang-gh
Copy link
Owner

Coming soon

multiple dict files

@yzhang-gh
Copy link
Owner

v0.9.0 released.

@gusbemacbe
Copy link
Contributor

Hello @yzhang-gh !

Regarding:

//// Hunspell format compatibility
if (/\d+/.test(list[0])) {
list.splice(0, 1);
}
list = list.map(word => word.replace(/\/.*$/, ''));

There is a problem with European Portuguese before the 1990 Orthographic Agreement dictionaries that use [...] instead of /...:

44108
,	[CAT=punct1a]
;	[CAT=punct1b]
:	[CAT=punct1c]
"	[CAT=punct2d]
(	[CAT=punct2e]
)	[CAT=punct2f]
!	[CAT=punctg]
?	[CAT=puncth]
.	[CAT=puncti]
...	[CAT=punctj]
à	[$ao$CAT=cp,Prep=a,Art=o$G=f,N=s]
abacateiro/p	[CAT=nc,G=m,N=s]
abacate/p	[CAT=nc,G=m,N=s]
abacaxi/p	[CAT=nc,G=m,N=s]
ábaco/p	[CAT=nc,G=m,N=s]
abade/pb	[CAT=nc,G=m,N=s]
abadia/p	[CAT=nc,G=f,N=s]
abafante/p	[CAT=adj,N=s,G=_]
abafar/XYPLDn	[CAT=v,T=inf,TR=t]
abafo/p	[CAT=nc,G=m,N=s]
abaixar/XYPLMD	[CAT=v,T=inf,TR=t]
abaixo-assinado/p	[CAT=nc,G=m,N=s]
abaixo	[CAT=adv,SUBCAT=lugar]
abalada/p	[CAT=nc,G=f,N=s]
abalançar/XYL	[CAT=v,T=inf,TR=_]
abalar/XYPLv	[CAT=v,T=inf,TR=t]
abalizar/XYPLD	[CAT=v,T=inf,TR=t]
abalo/p	[CAT=nc,G=m,N=s]
abalroar/XYPLcM	[CAT=v,T=inf,TR=t]
abanadela/p	[CAT=nc,G=f,N=s]
abanadura/p	[CAT=nc,G=f,N=s]
abananado/fp	[CAT=adj,N=s,G=m]
abanão/p	[CAT=nc,G=m,N=s]
abanar/XYPLD	[CAT=v,T=inf,TR=t]
abanar/XYPLD	[CAT=v,T=inf,TR=t]
abandonar/XYPLMv	[CAT=v,T=inf,TR=t]
abandono/p	[CAT=nc,G=m,N=s]
abantesma/p	[CAT=nc,G=_,N=s]
aba/p	[CAT=nc,G=f,N=s]
abanico/p	[CAT=nc,G=m,N=s]
abano/p	[CAT=nc,G=m,N=s]
abarca	[CAT=nc,G=f,N=s]
abarcante/p	[CAT=a_nc,N=s,G=_]
abarcar/XYPLMDn	[CAT=v,T=inf,TR=t]
abarrotar/XYPLM	[CAT=v,T=inf,TR=t]
abastança	[CAT=nc,G=f,N=s]
abastardar/XYPLM	[CAT=v,T=inf,TR=t]
abastar/XYPLM	[CAT=v,T=inf,TR=t]
abastecedouro/p	[CAT=nc,G=m,N=s]
abastecer/XYPLMD	[CAT=v,T=inf,TR=t]
abastonar/XYPL	[CAT=v,T=inf,TR=t]
abatatar/XYPL	[CAT=v,T=inf,TR=t]
abate/p	[CAT=nc,G=m,N=s]
abater/XYPLMD	[CAT=v,T=inf,TR=t]
abaular/YPLM	[CAT=v,T=inf,TR=t,I=3]
abcesso/p	[CAT=nc,G=m,N=s]
abcissa/p	[CAT=nc,G=f,N=s]
abdicante/p	[CAT=a_nc,N=s,G=_]
abdicar/XYPLcDnv	[CAT=v,T=inf,TR=_]
abdicatário	[CAT=a_nc,G=m,N=s]
abdicativo/p	[CAT=adj,N=s,G=m]
abdicatório	[CAT=adj,N=s,G=m]
abdómen/p	[CAT=nc,G=m,N=s]
abdominal/p	[CAT=adj,N=s,G=_]
abdução/p	[CAT=nc,G=f,N=s]
abducente	[CAT=adj,N=s,G=_]
abdutivo/f	[CAT=adj,N=s,G=m]
abdutor/fp	[CAT=nc,G=m,N=s]
abduzir/ZYPL	[CAT=v,T=inf,TR=t]
abecedário/p	[CAT=nc,G=m,N=s]
á-bê-cê/p	[CAT=nc,G=m,N=s]
abeiçar/XYPL	[CAT=v,T=inf,TR=t]
abeirar/XYPLM	[CAT=v,T=inf,TR=t]
abelha-mestra/p	[CAT=nc,G=f,N=s]
abelha/p	[CAT=nc,G=f,N=s]
abelhão/p	[CAT=nc,G=m,N=s]
abelhudo/fp	[CAT=adj,N=s,G=m]
abeliano/fp	[CAT=adj,N=s,G=m]
abencerragem/p	[CAT=nc,G=f,N=s]
abençoadeira	[CAT=nc,G=f,N=s]
abençoar/XYPLD	[CAT=v,T=inf,TR=t]
aberração/p	[CAT=nc,G=f,N=s]
aberrante/pm	[CAT=adj,N=s,G=_]
aberrar/XYLcn	[CAT=v,T=inf,TR=i]
aberrativo	[CAT=adj,N=s,G=m]
aberta/p	[CAT=nc,G=f,N=s]
abertivo	[CAT=adj,N=s,G=m]
aberto/fpmR	[CAT=adj,N=s,G=m]
abertura/pE	[CAT=nc,G=f,N=s]
abesoirar/XYPL	[CAT=v,T=inf,TR=t]
abesourar/XYPL	[CAT=v,T=inf,TR=t]
abespinhar/XYPL	[CAT=v,T=inf,TR=t]
abeto/p	[CAT=nc,G=m,N=s]
abetumar/XYPL	[CAT=v,T=inf,TR=t]
abismal/p	[CAT=adj,N=s,G=_]
abismar/XYPLN	[CAT=v,T=inf,TR=t]
abismo/p	[CAT=nc,G=m,N=s]
abissal/p	[CAT=adj,N=s,G=_]
abissínio/fp	[CAT=adj,N=s,G=_]
abjecção/p	[AO90=abjeção,CAT=nc,G=f,N=s]
abjecto/fp	[AO90=abjeto,CAT=adj,N=s,G=m]
abjudicar/XYPLcDnv	[CAT=v,T=inf,TR=t]
abjurar/XYPLcMDnv	[CAT=v,T=inf,TR=t]
abjuratório	[CAT=adj,N=s,G=m]
ablação/p	[CAT=nc,G=f,N=s]
ablativo/p	[CAT=adj,N=s,G=m]
ablativo/p	[CAT=nc,G=m,N=s]
abnegar/XYPLBcD	[CAT=v,T=inf,TR=t]
abnegativo	[CAT=adj,N=s,G=m]
abobadado/fp	[CAT=adj,N=s,G=m]
abóbada/p	[CAT=nc,G=f,N=s]
abobar/XYPL	[CAT=v,T=inf,TR=t]
aboboral	[CAT=nc,G=m,N=s]
aboborar/XY	[CAT=v,T=inf,TR=t]
abóbora/p	[CAT=nc,G=f,N=s]
aboboreira/p	[CAT=nc,G=f,N=s]
abocamento/p	[CAT=nc,G=m,N=s]
abocanhar/XYPL	[CAT=v,T=inf,TR=t]
abolicionismo/p	[CAT=nc,G=m,N=s]
abolicionista/Ap	[CAT=a_nc,N=s,G=_]
abolir/YPLcMD	[CAT=v,T=inf,TR=t,I=3]
abolitivo	[CAT=adj,N=s,G=m]
abominar/XYPLcDv	[CAT=v,T=inf,TR=t]
abonar/XYPLD	[CAT=v,T=inf,TR=t]
abonatório/fp	[CAT=adj,N=s,G=m]
abonecado/fp	[CAT=adj,N=s,G=m]
abono/p	[CAT=nc,G=m,N=s]
abordagem/p	[CAT=nc,G=f,N=s]
abordar/XYPLDv	[CAT=v,T=inf,TR=t]
abordo	[CAT=nc,G=m,N=s]
aborígene/p	[CAT=a_nc,N=s,G=_]
aborrecer/XYPLMDv	[CAT=v,T=inf,TR=t]
abortadeira	[CAT=nc,G=f,N=s]
abortar/XYLMD	[CAT=v,T=inf,TR=i]
abortivo/fp	[CAT=a_nc,G=m,N=s]
aborto/pA	[CAT=nc,G=m,N=s]
abotoadeira/p	[CAT=nc,G=f,N=s]
abotoadura/p	[CAT=nc,G=f,N=s]
abotoar/XYPLSD	[CAT=v,T=inf,TR=t]
abracadabra/p	[CAT=nc,G=m,N=s]
abraçadeira/p	[CAT=nc,G=f,N=s]
abraçar/XYPLMD	[CAT=v,T=inf,TR=t]
abraço/p	[CAT=nc,G=m,N=s]
abrandar/XYPLM	[CAT=v,T=inf,TR=_]
abrangência/p	[CAT=nc,G=f,N=s]
abranger/XYPLn	[CAT=v,T=inf,TR=t]
abrasador/fp	[CAT=adj,N=s,G=m]
abrasante/p	[CAT=adj,N=s,G=_]
abrasão	[CAT=nc,G=f,N=s]
abrasar/XYPLMn	[CAT=v,T=inf,TR=t]
abrasileirar/XYPL	[CAT=v,T=inf,TR=t]
abrasivo/fp	[CAT=nc,G=m,N=s]
ab-reacção/p	[AO90=ab-reação,CAT=nc,G=f,N=s]
abre-latas	[CAT=nc,G=m,N=s,N=_]
abrenunciar/XYPLc	[CAT=v,T=inf,TR=t]
abreviar/XYPLcBMD	[CAT=v,T=inf,TR=t]
abreviativo	[CAT=adj,N=s,G=m]
abreviatura/p	[CAT=nc,G=f,N=s]
abrigada/p	[CAT=nc,G=f,N=s]
abrigadoiro/p	[CAT=nc,G=m,N=s]
abrigadouro/p	[CAT=nc,G=m,N=s]
abrigar/XYPLSD	[CAT=v,T=inf,TR=t]
abrigo/p	[CAT=nc,G=m,N=s]
abrilhantar/XYPL	[CAT=v,T=inf,TR=t]
abrir/XYPLM	[CAT=v,T=inf,TR=t]
abrolhar/M	[CAT=v,T=inf,TR=_]
abrolhoso	[CAT=adj,N=s,G=m]
abrunhal	[CAT=nc,G=m,N=s]
abrunheiro/p	[CAT=nc,G=m,N=s]
abrunho/p	[CAT=nc,G=m,N=s]
abrupto/fpm	[CAT=adj,N=s,G=m]
absentismo/p	[CAT=nc,G=m,N=s]
absentista/p	[CAT=a_nc,N=s,G=_]
abside/p	[CAT=nc,G=f,N=s]
absíntio/p	[CAT=nc,G=m,N=s]
absinto/p	[$absíntio$CAT=nc,G=m,N=s]
absoluto/fpmti	[CAT=a_nc,G=m,N=s]
absolutório	[CAT=adj,N=s,G=m]
absolver/XYPLM	[CAT=v,T=inf,TR=t]
absolvição/p	[CAT=nc,G=f,N=s]
absorção/p	[CAT=nc,G=f,N=s]
absorto/fp	[CAT=adj,N=s,G=m]
absorvedor	[CAT=adj,N=s,G=m]
absorvedouro/p	[CAT=nc,G=m,N=s]
absorvência/p	[CAT=nc,G=f,N=s]
absorvente	[CAT=a_nc,N=s,G=_]
absorver/XYPLDnv	[CAT=v,T=inf,TR=t]
absorvibilidade/p	[CAT=nc,G=f,N=s]
abstémio/fp	[CAT=adj,N=s,G=m]
abstenção/p	[CAT=nc,G=f,N=s]
abstencionismo/p	[CAT=nc,G=m,N=s]
abstencionista/p	[CAT=a_nc,N=s,G=_]
abster/PLMn	[CAT=v,T=inf,TR=t,I=3]
abstinência/p	[CAT=nc,G=f,N=s]
abstinente	[CAT=adj,N=s,G=_]
abstracção/pt	[AO90=abstração,CAT=nc,G=f,N=s]
abstraccionismo/p	[AO90=abstracionismo,CAT=nc,G=m,N=s]
abstractivo	[AO90=abstrativo,CAT=adj,N=s,G=m]
abstracto/fpmi	[AO90=abstrato,CAT=a_nc,G=m,N=s]

@yzhang-gh
Copy link
Owner

Thanks for the information. Would you be willing to open a PR? 😉

@gusbemacbe
Copy link
Contributor

OK, I will try to test and check if it works.

@gusbemacbe
Copy link
Contributor

Done!

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

3 participants