-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
bugs:
- make
updateInputrun only after the wasm is loaded chinesereader.js:373 - either disallow spaces in file names or actually store file name list as a list of strings chinesereader.js:289-367
- sanitize text and filenames for html code. (you can write unsanitized html in the input box!)
- look into adding more markdown-like commands?
- show potential words formed by later parts of word and following words. ex: the phrase "笔试和面试" finds words for 笔试, 和面, and 试 (even though it probably should be 笔试, 和, and 面试) so the program should also show that 面试 was a possible word
- "数学,物理" shows definition for 数学物理 even though there is a different character in between (this is caused by the js side)
- clicking on third line's "啊啊" doesnt show defintion for "啊<" (need to unsanitize or find some other way to find adjacent text):
啊啊
啊<
啊啊<
#(word "啊啊" "啊啊" "a5 a5" aaaaaaaaaa)
#(word "啊<" "啊<" "a5 <" aAaaA??? )
ui
- something like new file button; all it would have to do is clear input and clear filename
- warnings to save when trying to close window or open different file
- control how text is copied; right now it sucks and will include a lot of newlines and wouldn't let you do things like only copy pinyin. needs investigation
- remember last saved input (maybe use a hash or something) to detect when no save is necessary even if the user did things in the input area
performance
- change how the JS gets buffers from the wasm such that the JS has full control over creation and destruction. right now, some destruction is handled by the wasm. plus it might be nice not to do this hacky thing where the wasm remembers the last allocation's size in order to figure out the size main.zig:83
- refactor the way i do preprocess recursion such that it is no longer recursive, or actually figure out the error set that the zig compiler is unable to infer on its own. i currently do the zig comptime trick to pretend to do recursion when it reality it is generating N instances of basically the same function until it hits the max depth that i specified main.zig:408
- compress dictionary (would be nice if
generate_definitions.zigcan perform the compression itself) - store dictionary separately from the wasm file (would probably need js get request and passing it from js to wasm)
- storing dictionary already in its in-memory representation so less initialization code needs to run
- investigate making dictionary take up less memory. perhaps a tree or bucket structure of some sort could be used even if it is slower than a hash map?
features
- UI for looking up a specified word (instead of needing to load the word through the input panel and clicking on it in the output area). basically just a UI for
showDefinition(word) - colors for custom definitions could be nice, like to have a different color shown for a word in the output. maybe as an optional parameter in the word definition command. would also need to slightly change the way custom definitions are stored, and have appropriate UI changes to show the color
- include basic dictionary fixes with the program. may require something like automatically including a read only file
- perhaps look into making the save button in a more easily findable location, rather than needing to switch to the storage tab. maybe also capture ctrl+s and provide a notification that a save occurred?
- parse the individual definitions in the word definition. they're separated by slashes

- maybe an options tab? could put the pinyin toggle in there, and maybe think of other things to throw in there.
- can put a force original text, force simplified text, or force traditional text option
- maybe a show only pinyin and no character option
- look into making a small stroke input method using this. would result in reducing my own reliance on google translate's character drawing tool to figure out what an unfamiliar character is
- show HSK level of words. iirc chinese vocab wiki might have them? they probably got it from somewhere else though, investigation is necessary
- commands for removing a definition or just hiding a definition from being used for word detection. may need some way to identify definitions, especially since some definitions might differ only by description
- look into detecting what parts of input changed
- could use this to have output jump to changed sections
- can also use it to optimize larger texts to avoid processing the entire text every time there is a change
Metadata
Metadata
Assignees
Labels
No labels