Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
Good evening Monks --

I am trying to partly 'backfill' or 'backrepair' a database of information about transactions wherein a user has downloaded a piece (or pieces) of data from one of our servers. More specifically, I am trying to repair some partial information, if possible.

The problem: the information in this database has been generated from a motley variety of logfiles, etc. over the past dozen years or so -- the hostname of the download-er is usually captured, to some degree, but it is sometimes only a partial hostname.

Ultimately we'd like to gather geographical information about where users are from, etc., for generating usage statistics, and so on.

What I am struggling to do currently is to match these partial hostnames (I'm working on identifying them _as_ partials, too) against a large text file of hostnames I have gathered from all the available relevant logfiles -- specifically, ones where the hostnames _don't_ have the 'partial' problem.

So, for example, if I have an entry where the host is recorded as 'blahdee.etcet' I'd like to match this to 'blahdee.etcetera.rome.it' or whatever, from my list of complete hostnames, and be able to assign a measure of 'confidence' that it is correct.

I'd guess this would be at least partly based on the number of characters in the partial hostname vs the number in the candidate full hostname ... but my maths aren't really up to* designing such a 'confidence algorithm.'

I can't show code for this part because I'm trying to plan it first -- the rest of the application this is part of is rather vanilla and dull. :) If anyone knows what sort of algorithm I should be looking for here, or whether what I'm trying to do is even feasible, I'd be grateful for a nudge in the right direction.

Thanks,

* I should say they aren't bad, but I have never taken a stats course, for example. I guess I am looking for formulae I might be able to grok without too awful much trouble.


In reply to how to generate confidence / weight score for a match? by chexmix

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others making s'mores by the fire in the courtyard of the Monastery: (9)
    As of 2014-07-25 08:58 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      My favorite superfluous repetitious redundant duplicative phrase is:









      Results (170 votes), past polls