Re: Checking if a list of names appears in a body of text.

Tech-Archive recommends: Fix windows errors by optimizing your registry



have you considered a decision tree built from your list of company names?

Colin =^.^=

"Brent" <writebrent@xxxxxxxxx> wrote in message
news:412800b8-0dde-4c8c-ad53-66c257d02021@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I have a list of company names (say, IBM, Corning, General Motors, and
another 5,000 of them).

If I take a body of text, a news article, for instance, and I want to
see which company names appear in that text, is there an efficient way
to do this?

I thought about looping through the array of names, and doing an
IndexOf or Regex match, but this method is slow. Then I thought about
an array intersection, but this is problematic for two-word company
names (you can't just create the second array based on a split on
spaces).

Any hints would be much appreciated!

--Brent


.



Relevant Pages

  • Re: Dynamic JS Form Variables
    ... In a contingent reality, Colin Fine possibly said: ... it was a stupid, stupid problem that was ... in an array, dynamically created portions of the form simply append to the ...
    (comp.lang.php)
  • Re: Clearing Arrays
    ... Colin wrote: ... > If I 'push' data from a database into an array to look/manipulate the data ... > and then using the same array name, 'push' data into the array from another ...
    (perl.beginners)
  • Re: Declaring an array of List Generic Class elements
    ... "colin" wrote: ... I am declaring an element like this: ... I would like to declare an array of this myList. ... When you're defining the array, you aren't constructing the Listobjects, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: array -> query
    ... Colin Fine wrote: ... $datay = array( ... I want to change it to query format. ... that you have some implicit structure in your array, ...
    (comp.lang.php)