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

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

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

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

orbitcowboy opened this issue Feb 28, 2012 · 7 comments

Comments

@orbitcowboy
Copy link

multy-thread->multithread

Currently codespell does not support these kind of entries.

Thanks and best regards

Martin Ettl

@lucasdemarchi
Copy link
Collaborator

Fixed now. Thanks.

@orbitcowboy
Copy link
Author

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
$

@lucasdemarchi
Copy link
Collaborator

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

@orbitcowboy
Copy link
Author

Thanks, i updated the version and now it works.

Thank you for your help!

Best regards

Martin

@orbitcowboy
Copy link
Author

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.

@lucasdemarchi
Copy link
Collaborator

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

@orbitcowboy
Copy link
Author

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants