Iterating words is slow

  • Logan Hanks

    Logan Hanks - 2002-08-01

    Is there a reason why iterating through all of the words (using getIndexWordIterator) takes so long?  On my reasonably fast computer it takes over a minute to iterate through all the words for all parts of speech.  Is it possible to make this at all faster?


    • Anonymous - 2002-08-14

      Dear Logan,

      Can you please show me how you use the iterators IndexWordItorator and listItorator.
      I am struggling with them.



    • John Didion

      John Didion - 2002-11-11

      The iteration is slow simply because the dictionary files are large and file IO is fairly slow. If you have the memory, I would recommend using the DictionaryToMap class to generate serialized HashMaps containing the dictionary contents and then using a MapBackedDictionary instead.

      If you figure out how to improved the speed of using a FileBackedDictionary, let me know.


Log in to post a comment.