https://github.com/dongyuwei/tiny_english_dictionary
tiny english dictionary for android and ios
https://github.com/dongyuwei/tiny_english_dictionary
Last synced: 4 months ago
JSON representation
tiny english dictionary for android and ios
- Host: GitHub
- URL: https://github.com/dongyuwei/tiny_english_dictionary
- Owner: dongyuwei
- Created: 2019-05-09T10:04:22.000Z (over 6 years ago)
- Default Branch: dev
- Last Pushed: 2022-03-01T23:49:00.000Z (almost 4 years ago)
- Last Synced: 2025-05-24T03:41:25.559Z (7 months ago)
- Language: JavaScript
- Size: 42.6 MB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## tiny english dictionary
Built by react-native.
### features
1. instant translate english to chinese when typing
2. instant spell-check when typing
3. show IPA of inputed word
4. 成语接龙
5. 支持输入汉语拼音查找英语单词
### dev
- Android: `yarn run-android` or
- iOS: `yarn run-ios`
### dev log
- Android: `yarn react-native log-android` or
- iOS: `yarn react-native log-ios`
### what I learned from this project?
1. config react native metro bundler as following can speedup app startup time dramatically:
```js
experimentalImportSupport: true,
inlineRequires: true
```
see: https://github.com/dongyuwei/tiny_english_dictionary/blob/master/metro.config.js
2. RN's javascriptCore engine does not support `console.time` api. It can crash app on Android.
3. [dawg-lookup](https://github.com/mckoss/dawg) is awesome, it can build trie from packed/serialized file quickly. But it does not support UTF-8 characters, so for 成语接龙, I need another trie data structure implementation, which is [tiny-trie](https://github.com/jnu/tiny-trie), it's speedy.
4. I use [Typo.js](https://github.com/cfinke/Typo.js/) to implement the spell-check feature.
5. [flatbuff](https://github.com/google/flatbuffers) and [schemapack](https://github.com/phretaddin/schemapack) are awesome. I have tried them, but they are difficult to integrate with react native. RN does not have proper/easy way to consume binary file. Fix me if I'm wrong. I have tried https://github.com/jidibingren/FlatBuffers-ObjC in this branch https://github.com/dongyuwei/hallelujahIM/tree/flatbuffer, but the performance gain is not so good as using json.
6. Using react-native to develop mobile app is really easy and fast, however you need to pay attention to app performance issue.