-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src/dict: abstract out deconjugators from dictionary code
Create a new class called QueryGenerator that defines a class that can generate queries from a string of text. ExactQueryGenerator implements this for searching exact text, and MeCabQueryGenerator implements this for deconjuating text with MeCab. This makes it so these two methods of generating queries can share all the same code for filtering duplicates, generating cloze info, and searching the database. This also makes it easier to implement new query generators in the future such as the deconjuator in #210 or the proposed MeCab with UniDic option in #211. This commit removes all multithreading from searches. I have known for a while that it provides little to no performance imporvement due to most time being spent querying a synchronized database. It may also harm performance on Windows. I don't see any need to add it back, but it can be if there is a compelling reason to. Queries seem plenty fast with this change.
- Loading branch information
Showing
12 changed files
with
741 additions
and
510 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.