in reply to Re^2: Creating Metadata from Text File
in thread Creating Metadata from Text File
Also, after you load the index table and you know how many docs are indexed (let's say it's 5000), you might want to try a query like:
If there are words that occur in all 5000 docs, you might as well add those to your stop list. (If the output of that particular query shows all 20 words with "5000", set the limit higher, to see how many words there are that occur in all documents.)SELECT count(doc_id),doc_word from doc_word_index group by doc_word order by count(doc_id) desc limit 20
In fact, if you start out by indexing all words, you can build your own stop list this way, and it might be more effective than just assuming that someone else's list of "most frequent words" is appropriate for your particular set of docs. You might also decide that the threshold for inclusion in the stop list is something like "occurs in 90% of docs", as opposed to "occurs in all docs". (The "document frequency" of words -- how many docs contain a given word -- can be a useful metric for assigning weights to search terms when you get into ranking the "hits" according to "relevance".)
Note that the "most frequent words" list you cited includes things like "number", "sound", "water", "air", "father", "mother", "country", etc, but these might occur only in some of your docs -- someone might have a valid expectation that they would be useful as a search terms, and it would be wrong not to index them.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Creating Metadata from Text File
by Trihedralguy (Pilgrim) on Jul 23, 2007 at 12:44 UTC | |
by graff (Chancellor) on Jul 25, 2007 at 01:13 UTC |