yzhang-gh / vscode-dic-completion

Dictionary completion
https://marketplace.visualstudio.com/items?itemName=yzhang.dictionary-completion
MIT License
52 stars 13 forks source link

Hunspell format and multiple dictionary files #25

Closed joshinils closed 4 years ago

joshinils commented 4 years ago

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 commented 4 years ago

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",

joshinils commented 4 years ago

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 commented 4 years ago

Thanks. So I think there are two features

joshinils commented 4 years ago

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 commented 4 years ago

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

yzhang-gh commented 4 years ago

Coming soon

multiple dict files
yzhang-gh commented 4 years ago

v0.9.0 released.

gusbemacbe commented 1 year ago

Hello @yzhang-gh !

Regarding:

https://github.com/yzhang-gh/vscode-dic-completion/blob/f31d8da805f2e805c63b44837973eb5236921635/src/completion.ts#L78-L82

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 commented 1 year ago

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

gusbemacbe commented 1 year ago

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

gusbemacbe commented 1 year ago

Done!