Monday, March 22, 2004

TextPairs search

Well, here is the task:

Sentence consists of words.
For instance, "Word1 word2 word3".
Words are grouped by phrases.
For example:
phrase1 = "Word1 word2"
phrase2 = "Word2 word3"
phrase3 = "Word1 word2 word3"

I consider both words and phrases as
text concepts.

Every text concept has a "start position" and an "next position".

I'm going to use "start position" as the key for text concept in the
collection.

As you can see, text concept "word2" has start position = 2
Text concept "phrase2" has start position = 2. That is the same with
"word2". That means duplication.

Original task is to find all text pairs in the specified sentence.

Any suggestions?

Monday, March 22, 2004, 10:54:33 AM, you wrote:

AIR> There is no type in .NET that can have multiple values with the same key.
AIR> But you can write your own class derived from DictionaryBase. There is an
AIR> example in MSDN how to do this. If you tell me more about your task and
AIR> conditions (how many items you expect to store and how many of them are
AIR> stored with the same key) I can help you to write this class :)