Skip to content

dongyuwei/tiny_english_dictionary

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:
experimentalImportSupport: true,
inlineRequires: true

see: https://github.com/dongyuwei/tiny_english_dictionary/blob/master/metro.config.js

  1. RN's javascriptCore engine does not support console.time api. It can crash app on Android.
  2. dawg-lookup 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, it's speedy.
  3. I use Typo.js to implement the spell-check feature.
  4. flatbuff and 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.
  5. Using react-native to develop mobile app is really easy and fast, however you need to pay attention to app performance issue.

About

tiny english dictionary for android and ios

Resources

Stars

Watchers

Forks

Packages

No packages published