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

Take care uppercase when input words #30

Closed
chenyukang opened this issue Nov 26, 2021 · 16 comments · Fixed by #32
Closed

Take care uppercase when input words #30

chenyukang opened this issue Nov 26, 2021 · 16 comments · Fixed by #32

Comments

@chenyukang
Copy link
Contributor

According discussion in #29.

For instance, we have 'banana' in dictionary, if I type this word in the beginning of a sentence, I will type "Ba", but it will not complete currently,
image

I guess ignore uppercase will be better. If "Banana" is in candidate list will be perfect.

@chenyukang
Copy link
Contributor Author

I read the source code, and will make a PR for this :)

@tadashi-aikawa
Copy link
Owner

Thank you for creating a issue! I'm looking forward to your PR 💚

And, I'm going to release v3.0.0 this weekend, so it would be next week at the earliest to release that includes your PR.

chenyukang added a commit to chenyukang/obsidian-various-complements-plugin that referenced this issue Nov 26, 2021
@tadashi-aikawa
Copy link
Owner

tadashi-aikawa commented Nov 26, 2021

@chenyukang
I have uploaded the latest pre-release version to tadashi-aikawa/obsidian-plugin-dev-sandbox 🚀

It probably works as you expected.

@chenyukang
Copy link
Contributor Author

@chenyukang I have uploaded the latest pre-release version to tadashi-aikawa/obsidian-plugin-dev-sandbox 🚀

It probably works as you expected.

Yes, it works like a charm! Awesome 🙌

But I can feel it a little bit slower when typing.
Again, because my words list is long.

I can image if we can use some algorithm like bucket sort will make it much quicker, split the list into 26 sub list according first character, and iterate the sub list only.

@chenyukang
Copy link
Contributor Author

Here I find a corner case, I have program and programming and programmer in dictionary,
but only internal link show in candiates:

image

Reading the code, haven't figure out.

@chenyukang
Copy link
Contributor Author

Here I find a corner case, I have program and programming and programmer in dictionary, but only internal link show in candiates:

image

Reading the code, haven't figure out.

I'm working on a PR.

@tadashi-aikawa
Copy link
Owner

Again, because my words list is long.

Would you tell me the number of your words? ( this ? )

I can image if we can use some algorithm like bucket sort will make it much quicker, split the list into 26 sub list according first character, and iterate the sub list only.

If everything works well after releasing v3.0.0 (which means nobody wants to partial match), I want to try it 👍

@chenyukang
Copy link
Contributor Author

Again, because my words list is long.

Would you tell me the number of your words? ( this ? )

yes

I can image if we can use some algorithm like bucket sort will make it much quicker, split the list into 26 sub list according first character, and iterate the sub list only.

If everything works well after releasing v3.0.0 (which means nobody wants to partial match), I want to try it 👍

Nice, for prefix-matching trie tree is also efficient, but need a little bit more coding that sorting.

@chenyukang
Copy link
Contributor Author

This VScode plugin is similar, you may have a reference 😏
https://github.com/yzhang-gh/vscode-dic-completion/blob/master/src/completion.ts

@tadashi-aikawa
Copy link
Owner

@chenyukang
I have tried to use your custom dictionary. Sure, it is bit slow, but just few milliseconds.

image

Would you show me console logs on Developer Tools?

@chenyukang
Copy link
Contributor Author

image

@tadashi-aikawa
Copy link
Owner

Thanks. Surely, it is too slow..

@chenyukang
Copy link
Contributor Author

Thanks. Surely, it is too slow..

I think a hotkey or shortcut to toggle complementation will also useful, 😏

@tadashi-aikawa
Copy link
Owner

I agree. There is already a Show suggestions command that triggers manually, but it can't avoid trigger suggestions for now 😅

image

Probably I can, but I didn't know whether it needs or not.

@tadashi-aikawa
Copy link
Owner

tadashi-aikawa commented Nov 27, 2021

I could make a slow environment by loading a dictionary you introduced first (about 500000words!). I will try to make it faster 😉

image

@chenyukang
Copy link
Contributor Author

chenyukang commented Nov 27, 2021

I could make a slow environment by loading a dictionary you introduced first (about 500000words!). I will try to make it faster 😉

I think it's not because my PC is not powerful. The time cost also related to the Obsidian contents.
Essentially, a longer word list will cost more time.

Instead of in one iteration, handling internal link, alias, dictionary complementation separately may help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

2 participants