Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Finding short DNS names from long text

by merlyn (Sage)
on Jul 12, 2009 at 20:03 UTC ( #779402=note: print w/replies, xml ) Need Help??


in reply to Finding short DNS names from long text

I think you're having trouble because your question is incomplete. You presume that there's "one" "domain" for each company. I can assure you that there isn't. And the question is also context-sensitive, since it would depend on what country you are in. Also, "adobe" is useless without the ".com", so you'll need to keep the entire name.

The more you can narrow down your question to the point where it would have the single answers you gave, the more likely you are at coming up with a solution that fulfills an answerable question. Start there.

For example, you could use the Yahoo::Search module and identify the top web hit for each of the companies you list. That would more than likely be correct, but if some company's own website is less trafficked than some other site that talks about them, you might be in for a surprise. But that's where your "human" could come in... present the top five hits on a clickable web interface, and let your human assist in selecting the name.

-- Randal L. Schwartz, Perl hacker

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

  • Comment on Re: Finding short DNS names from long text

Replies are listed 'Best First'.
Re^2: Finding short DNS names from long text
by dwhite20899 (Friar) on Jul 12, 2009 at 20:54 UTC
    You're correct, I left that (multiple results) out.

    To be extremely specific, I want to mimic the vendor name part of the MITRE Common Platform Enumeration found on page 10 of http://cpe.mitre.org/files/cpe-specification_2.2.pdf

    They deal with multiple results by using the shortest string. They also deal with saving ".com" or ".org" in certain cases.

    It's certainly got it's shortcomings, but I want to sync up with http://nvd.nist.gov .

    Yahoo::Search looks good!

      "To be extremely specific, I want to mimic the vendor name part of the MITRE Common Platform Enumeration found on page 10 of http://cpe.mitre.org/files/cpe-specification_2.2.pdf "

      FWIW: That was how you should have asked the question in the first place.

      Knowing only what 30 seconds of googling has told me about CPE, wouldn't the best way to mimic CPE's behavior be to directly use the Official CPE Database of names?

        Yes, it's easy to get the dictionary of vendor strings used in the database, but I just have all these long text strings of company names. Probably including a bunch of companies that aren't in the CPE database. If I get the mapping done, I'll just stick to CPE vendor strings.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://779402]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (1)
As of 2017-12-16 10:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (449 votes). Check out past polls.

    Notices?