mardi 7 avril 2015

When should I split a JSON into smaller parts?

I want to use cmudict file in a web. It contains 170000 words with its phonetic transcription (in ARPAbet symbols).


http://ift.tt/Xx8c8y


I want to use it in JSON format, search any word introduced by the user and return an explanation of how to pronounce it syllabe by syllabe. The second part is not very complex in search terms as there are only 39 different phonemes, but the first one with the 170000 entries may consume too much time if the user introduces a text instead of a single word to transcript.


I wonder if it's worth to split the JSON into for example 26 parts (one per initial letter) and search only in the corresponding file.


Also I don't know if JSON is the best format for this, but I want to use it in a free blog like Tumblr or Blogger ones (or similar, the thing is that I don't want to spend money in this) and Javascript is what they support. I would listen suggestions on this too.





Aucun commentaire:

Enregistrer un commentaire