Is it possible to add dictionary entries like this? #4

Closed
orbitcowboy opened this Issue Feb 28, 2012 · 7 comments

Comments

Projects
None yet
2 participants

multy-thread->multithread

Currently codespell does not support these kind of entries.

Thanks and best regards

Martin Ettl

Owner

lucasdemarchi commented Feb 28, 2012

Fixed now. Thanks.

That was fast!
Thanks, but it seem that if two words are speparated by a '-' it codespell does not detect it correctly.

$ tail test.txt
multy-thread

$ tail dict.txt
multy-thread->multithread

$ ./codespell.py dict.txt test.txt
$

Owner

lucasdemarchi commented Feb 28, 2012

Are you using the correct version? I just fixed codespell to allow hiphens:

$ cat /tmp/a.txt2
multy-thread

$ ./codespell.py data/dictionary.txt /tmp/a.txt2
/tmp/a.txt2:1: multy-thread ==> multithread

Thanks, i updated the version and now it works.

Thank you for your help!

Best regards

Martin

Whait,

now the rest of the dictionary files are not detected anymore.
Try reverting to recent version

rx = re.compile(r"[\w']+")

and current head

rx = re.compile(r"[\w-']+")

With the current version, multy-thread is detected, but all other entries are ignored.

Owner

lucasdemarchi commented Feb 28, 2012

ahn? it works just fine here. your revert to recent version is wrong... there's a trailing slash.

$ cat /tmp/a.txt2
multy-thread
licenced
worls

$ ./codespell.py data/dictionary.txt /tmp/a.txt2
/tmp/a.txt2:1: multy-thread ==> multithread
/tmp/a.txt2:2: licenced ==> licensed
/tmp/a.txt2:3: worls ==> world

Ah, thanks again, my fault! It works perfectly now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment