大家给点意见
Suppose that we have a large collection of words in the English language, represented as strings. (Maybe these are obtained by reading in one or more text files.) Now suppose that we wish to quickly answer a query that asks if a given word is in our collection. Maybe the query involves the string "measure" -- we want to say whether this is in our collection or not. This is easy to do if we use a hash table to store our collection.
Let us assume that we want to answer the queries in a more robust way: If the user queries "maesure" or say "mesure", we still want to output a hopefully small list of words in our collection that includes "measure" (assuming "measure" is in our collection). That is, if the user queries with a string that is close to one of the words in our collection, we should output a small set of words from our collection that includes the right word. Our goal is to develop a reasonable solution to this problem based on variants of hash table ideas.
大家给点建议应该怎么设计啊!!
谢谢了