Commit Graph

96 Commits

Author SHA1 Message Date
toasted-nutbread
9899727d7d
Frequency dictionary sort (#1938)
* Add sortDictionary/sortDictionaryOrder options

* Update options

* Add API.getTermFrequencies

* Add settings

* Implement frequency dictionary sorting

* Update test

* Update test data

* Fix handling of undefined rank-based frequencies
2021-09-26 11:08:16 -04:00
toasted-nutbread
dfddf3792e
Fix redundant secondary term lookups (#1942) 2021-09-09 23:29:41 -04:00
toasted-nutbread
7883d39496
Normalize terms and readings during import (#1941) 2021-09-09 23:25:24 -04:00
toasted-nutbread
ac12b50939
Dictionary import count details (#1935)
* Store count information when importing a dictionary

* Add importDate

* Update property ordering

* Update tests

* Update importDate
2021-09-07 11:12:58 -04:00
toasted-nutbread
b988417031
Fix incorrect index being used for headword removal (#1933) 2021-09-05 21:07:23 -04:00
toasted-nutbread
97a80276f6
Database readwrite transaction updates (#1932)
* Add _readWriteTransaction helper

* Improve deleteDictionary order

* Make onProgress event optional

* Simplify progress rate parameter
2021-09-05 20:00:08 -04:00
toasted-nutbread
0331374241
Dictionary media import improvements (#1926)
* Add base64ToArrayBuffer to StringUtil

* Remove unnecessary media-util.js import

* Run async requirements in serial rather than parallel

* Update API.getMedia handler to convert ArrayBuffer content to base64

* Rename getImageResolution to getImageDetails

* Change parameter order of getImageDetails

* Pre-process and store media as an ArrayBuffer

* Remove MediaUtil.createBlobFromBase64Content

* Fix Anki media injection
2021-09-03 22:33:58 -04:00
toasted-nutbread
1599ec1f15
Fix dictionary import total progress (#1921)
* Fix incorrect total count for final step of dictionary import

* Update tests to validate progress args
2021-08-31 21:42:18 -04:00
toasted-nutbread
87fbb3c01c
Dictionary worker updates (#1914)
* Add support for running getDictionaryCounts via DictionaryWorker

* Run dictionary integrity checks on a separate thread

* Remove api.getDictionaryCounts
2021-08-28 14:30:50 -04:00
toasted-nutbread
74709296e5
Dictionary database worker refactoring (#1913)
* Rename DictionaryWorker => DictionaryWorkerHandler

* Rename var

* Rename file

* Simplify

* Rename DictionaryDatabaseModifier => DictionaryWorker

* Rename dictionary-database-modifier.js => dictionary-worker.js
2021-08-28 14:22:16 -04:00
toasted-nutbread
b6fc786f9a
Update dictionary importer progress event for step 6 to occur slightly earlier (#1897) 2021-08-14 18:16:30 -04:00
toasted-nutbread
4839503d54
Threaded dictionary delete (#1895)
* Generalize dictionary worker

* Add deleteDictionary functionality

* Update DictionaryController to use DictionaryDatabaseModifier

* Fix incorrect result handling
2021-08-14 12:41:58 -04:00
toasted-nutbread
3e350bd563
Dictionary worker refactor (#1894)
* Rename dictionary worker files

* Rename classes

* Rename file

* Rename class

* Generalize the _invoke method

* Rename 'import' to 'importDictionary'

* Improve DictionaryImporterMediaLoader usage

* Refactor message handler

* Generalize onProgress event
2021-08-14 11:46:26 -04:00
toasted-nutbread
cd78d56fee
Database improvements to data persistency (#1893)
* Fix function check

* Rename arguments of getAll, getAllKeys, and their private functions

* Simplify bulkAdd

* Simplify delete

* Simplify bulkDelete

* Remove persistData
2021-08-13 18:35:31 -04:00
toasted-nutbread
2d5e6f8394
Fix data not being persisted after terminating Worker thread (#1877) 2021-08-07 15:25:00 -04:00
toasted-nutbread
cd3f47a359
Dictionary import progress improvements (#1868)
* Update loop vars

* Update loop

* Improve progress reporting during the import process
2021-07-31 19:13:41 -04:00
toasted-nutbread
01c5c5c04b
Dictionary importer refactoring (#1867)
* Remove map of schemas

* Don't reuse dictionary importer instances

* Refactor

* Update how progress callback is used
2021-07-31 18:08:51 -04:00
toasted-nutbread
1d6e437fb2
Dictionary importer refactor (#1866)
* Move function implementations

* Use file() instead of files[]

* Move functionality into local functions

* Simplify

* Pass dictionary title to conversion functions

* Update how legacy tags are added
2021-07-31 16:53:38 -04:00
toasted-nutbread
8c4a50f68c
DictionaryImporterThreaded (#1865)
* Create new classes for importing dictionaries from a separate thread

* Use threaded importer

* Update worker tests
2021-07-31 14:46:09 -04:00
toasted-nutbread
11f210375e
DictionaryImporter improvements (#1862)
* Improve error message

* Simplify URL for JSON fetching
2021-07-31 14:00:19 -04:00
toasted-nutbread
00c5ae7983
DictionaryImporterMediaLoader (#1860)
* Rename param for consistency

* Move media loading functionality into DictionaryImporterMediaLoader

* Create test class for media loading

* Remove unnecessary Blob/Image/URL functionality
2021-07-31 12:30:31 -04:00
toasted-nutbread
2d57d69b9e
Improve dictionary importer (#1859)
* Optimize dictionary data parsing during import

* Use ArrayBuffer instead of string

* Add missing function for testing
2021-07-31 10:53:35 -04:00
toasted-nutbread
b99850ed54
Call URL.revokeObjectURL for created URLs (#1858)
* Call URL.revokeObjectURL for created URLs

* Refactor image usage
2021-07-29 21:16:55 -04:00
toasted-nutbread
b0596c8a3c
Rename pitchAccent in source code (#1852)
* Rename pitchAccentPosition to pitchAccentDownstepPosition

* Rename function

* Rename

* Rename

* pitches => pronunciations
2021-07-26 19:45:30 -04:00
toasted-nutbread
fafa746a63
Sandbox script folders (#1837)
* Move scripts

* Update paths

* Fix ordering

* Simplify eslint rules
2021-07-17 17:10:25 -04:00
toasted-nutbread
a933cfdc07
Pronunciation nasal improvement (#1834)
* Organize

* Add utility to get diacritic information about a character

* Show mora without diacritic

* Add a hidden handakuten for copy-paste purposes
2021-07-17 12:20:11 -04:00
toasted-nutbread
41fc76d6fd
Devoice and nasal pronunciation info (#1832)
* Update schema to support information about nasal and devoiced mora

* Expose nasalPositions and devoicePositions in dictionary entry data

* Expose nasalPositions, devoicePositions in grouped pitch info

* Update display generator

* Update test dictionary data

* Update test data
2021-07-15 22:39:33 -04:00
toasted-nutbread
0d16709547
JapaneseUtil updates (#1813)
* Rename test file

* Use shorthand

* Add support checking functions

* Remove convertReading from JapaneseUtil
2021-07-09 17:31:16 -04:00
toasted-nutbread
24ec22b2e1
Text parse updates (#1811)
* Expose more settings to QueryParser

* Rename textParse to parseText

* Refactor

* Convert reading inside QueryParser rather than Backend

* Remove use of readingMode from backend

* Rename

* Update parseText args

* Simplify

* Update results

* Move use of optionsContext

* Run mecab and internal parser in parallel

* Added "dictionary-reading" reading mode

* Update romaji conversion case
2021-07-09 16:05:57 -04:00
toasted-nutbread
845070b817
Translator sorting updates (#1755)
* Update when definition sorting takes place

* Update test data

* Change order of sorting
2021-06-26 12:37:38 -04:00
toasted-nutbread
6e0a367afc
Translator data format updates (#1754)
* Add {dictionaryIndex, dictionaryPriority} to definitions

* Add score to definitions

* Add id to definition

* Use definition id instead of ids array

* Remove ids array

* Update docs

* Update test data
2021-06-26 11:57:09 -04:00
toasted-nutbread
7ae964c830
Structured content updates (#1733)
* Add support for imageRendering

* Make crisp-edges appearance on Firefox more similar to Chrome

* Refactor

* Add background option

* Move data-image-rendering attribute

* Restructure

* Organize

* Add support for appearance

* Update test dictionary

* Update tests
2021-06-06 14:47:48 -04:00
toasted-nutbread
3a095b1f6c
Improve secondary definitions (#1731)
* Improve secondary search definitions

* Simplify
2021-06-05 23:17:13 -04:00
toasted-nutbread
d87515ec12
Translator id updates (#1730)
* Allow unsequenced definitions to be added to multiple groups

* Update translator data to store multiple IDs

* Update Anki note data

* Update test data

* Update docs
2021-06-05 22:27:58 -04:00
toasted-nutbread
057283245e
Add support for definitionless main dictionary (#1729) 2021-06-05 13:35:23 -04:00
toasted-nutbread
8e330d54d6
Fix popup preview disappearing after changing a setting (#1707) 2021-05-23 14:30:31 -04:00
toasted-nutbread
d7cf019b4a
Json schema improvements (#1698)
* Simplify schema multi-push/pop

* Reverse order of schema path

* Reverse order of value path

* Simplify schema path structure

* Rename for better clarity
2021-05-22 17:56:44 -04:00
toasted-nutbread
d16739a83a
Json schema validation improvements (#1697)
* Create new JsonSchema class

* Add proxy handler

* Update tests

* Update validation scripts

* Update backend

* Update audio downloader

* Update options util

* Update dictionary importer

* Update json schema file reference

* Remove old json-schema.js

* Rename new json-schema.js

* Update file names

* Rename class
2021-05-22 15:45:20 -04:00
toasted-nutbread
be23acf499
Structured content image size units (#1692)
* Add support for sizeUnits on image content

* Update test data
2021-05-20 19:33:08 -04:00
toasted-nutbread
6184bcb812
Selection clear improvements (#1690)
* Update selection clear process

* Clean up old clearSelection API

* Update clear order

* Add clear event handling
2021-05-19 20:09:37 -04:00
toasted-nutbread
eddd028864
Add support for definitions with structured content (#1689)
* Add structured content to schema

* Add support for generating custom content

* Update importer

* Update test data

* Add verticalAlign property
2021-05-19 18:24:50 -04:00
toasted-nutbread
f3cf4d10c7
Dictionary image display refactoring (#1687)
* Generalize image definition generation

* Enable optional aspect ratio

* Move styles

* Update styles

* Add more options for collapsing images

* Add image options for collapsing

* Improve layout for images that are collapsed
2021-05-18 17:41:27 -04:00
toasted-nutbread
12451eaf61
Fix repeated dictionary image importing (#1685) 2021-05-16 20:11:32 -04:00
toasted-nutbread
66d048832f
Sentence termination character mode (#1682)
* Change enableTerminationCharacters to terminationCharacterMode

* Update settings

* Update sentence extraction

* Update tests

* Add tests
2021-05-16 15:24:38 -04:00
toasted-nutbread
de6db32aa6
Improve source term exact match count (#1674)
* Update sourceTermExactMatchCount to be based on headword count

* Update tests
2021-05-14 19:26:27 -04:00
toasted-nutbread
289bdc1622
Improve term grouping (#1653)
* Rename _addUniqueStrings to _addUniqueSimple

* Update definition merging to not depend the sequence number

* Improve naming

* Update AnkiNoteDataCreator

* Update docs

* Remove fields that no longer exist

* Update test data
2021-05-08 13:16:56 -04:00
toasted-nutbread
40b29cb0d3
Add pitch categories template helper (#1636)
* Move utility function

* Expose dictionary entry as a hidden property for internal use

* Add pitchCategories helper
2021-04-28 21:57:49 -04:00
toasted-nutbread
512391346b
Translator alphanumeric improvement (#1635)
* Simplify alphanumeric check

* Update option name for clarity
2021-04-28 21:17:05 -04:00
toasted-nutbread
6f5ad490fb
Add support for restoring the selection after using scanSelectedText (#1631) 2021-04-26 21:05:46 -04:00
toasted-nutbread
f022febfe9
Fix incorrect return type causing an error (#1623) 2021-04-21 18:11:43 -04:00