Detecting Japanese and Chinese Words

Hey. In the app I created I had resolved problem with detecting Japanese and Chinese words in this way:

  1. Detect clicked symbol and copy a string of 4 previous symbols, clicked symbol and 4 symbols after clicked symbol
  2. Send to the AI this string with request of detecting the word with clicked symbol in it
  3. Ask AI to give a dictionary form of detected word and save it in the datebas