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

tokenize on sentence, not all document #28

Open
ngawangtrinley opened this issue Apr 27, 2020 · 0 comments
Open

tokenize on sentence, not all document #28

ngawangtrinley opened this issue Apr 27, 2020 · 0 comments

Comments

@ngawangtrinley
Copy link
Collaborator

ngawangtrinley commented Apr 27, 2020

Description

Tokenizing is done on all the text each time. This makes the editor very slow. The waiting time grows exponentially. The maximum typing latency should be around ##, now it's much bigger.

The tokenizer is triggered by the syllable marker '་', the phrase marker '།'. and return char. At the moment the tokenizer processes all the document in one go. It should be tokenizing one phrase at a time. A phrase is a string of char separated by a '།'.

How to reproduce

  1. Paste the text from here and try to edit
  2. paste the text sentence by sentence and check the waiting time

Proposed solution

  • find a way to tokenize and highlight in the background (is it even possible with python?)
  • find phrase span, resegment the phrase at each trigger char
  • get n syllable context around the cursor, segment the context at each trigger
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant