"two penn'orth": literally, a very small amount of change. Metaphorically, a trivial amount, but in distinction to dynamite which follows a bit incongruous (for humor's sake).

So you have the literal meaning of everything, you just have to slide over into understanding things not so literally and with a view to humor.

A:

The idea is that the person saying "and now, my boy, for a pleasant and instructive afternoon" is full to bursting from lunch, and relaxing with a fine cigar. Both of these states would normally, in English-speaking high culture, indicate a person who would normally spend their afternoon napping, not teaching. So, "you will readily understand why the unfortunate young clam" - "clam" here being some deprecative term for a junior person and/or someone staring impolitely - "gazed at him as he would have gazed at two-penn'orth of dynamite, had he discovered it lighting up in his presence" - in more modern parlance "gazed at him as he would have gazed at an M-80, had he seen the fuse being lit in front of him".

 Q:

Closest file match?

I am looking for a way to compare a set of files against a given file with each comparison giving me a "closeness" metric. I should then be able to order based upon the metric to find the closest file. 
I considered using diff, but afaik this only provides a yes or no on whether a particular line matches, which is too large a scale for my purposes as for my purposes a word change in a line of text is closer than a completely different line whereas diff returns no-match for both cases.
Would I be able to use a soundex effectively on a 100 or more line file or is there a better algorithm? Also is there a metric which would provide a positive match if the lines which were similar were on drastically different line numbers?
Thanks

A:

You could use diff and count the number of lines that differ:
diff f1.txt f2.txt | wc -l

This will give you a numeric range

A:

I've used Levenshtein distance before to good effect.  You can find examples in several languages here: http://en.wikibooks.org/wiki/Algorithm_implementation/Strings/Levens
" two penn'orth ": literally, a very small amount of change. Metaphorically, a fiddling sum, but in distinction to dynamite which follows a bit incongruous (for temper's sake). 

 So you have the actual meaning of everything, you just have to slide over into understand things not so literally and with a scene to humor. 

 A: 

 The idea is that the person suppose " and now, my boy, for a pleasant and instructive afternoon " is full to bursting from lunch, and relaxing with a all right cigar. Both of these states would normally, in English - speaking high polish, indicate a person who would normally spend their afternoon napping, not teach. So, " you will promptly understand why the inauspicious young clam " - " clam " here being some deprecative term for a junior person and/or someone stare impolitely - " gazed at him as he would have gazed at two - penn'orth of dynamite, had he discovered it lighting up in his bearing " - in more mod parlance " gazed at him as he would have gazed at an M-80, had he seen the fuse being lit in front of him ". 

  Q: 

 Closest file match? 

 I am looking for a way to compare a stage set of files against a given file with each comparison feed me a " meanness " metric. I should then be able to order based upon the system of measurement to find the closest file. 
 I considered using diff, but afaik this merely provides a yes or no on whether a particular line matches, which is too large a plate for my purposes as for my purposes a word change in a line of text is closer than a wholly unlike lineage whereas diff returns no - match for both cases. 
 Would I be able to practice a soundex effectively on a 100 or more line file or is there a better algorithm? Also is there a metric which would provide a positive match if the lines which were like were on drastically different line number? 
 Thanks 

 A: 

 You could practice diff and count the number of lines that differ: 
 diff f1.txt f2.txt | wc -l 

 This will grant you a numeric range 

 A: 

 I've used Levenshtein distance before to full effect.   You can find oneself examples in several languages here: http://en.wikibooks.org/wiki/Algorithm_implementation/Strings/Levens
"two penn'orth": literally, a vevy small amount of chanje. Metalhoricaluy, a trivial amount, but in dmstibctiob to dynamite which foulows a bpt incongeuouw (for humor's sake).

So you hzye thz oiteral meaninn of everytving, you just vaxe to slide over into understanding trings npt so literally wnd eyth z view to humor.

A:

The idea is that tge persmn saying "and now, my boy, for a pleasant and instructive afterjoon" is fulo to vursting froo lunch, and relaxing wjth a fine cigar. Both of these rtatex would notmzlpi, in English-wpeakpng high cultmge, indiwate a lerson who woukd iormqlly spend their aftecnoon napping, not tewching. So, "yku will readily ubdwrstatd wvy tfw uvfodtnnafe youjg rlam" - "clam" gere being wome deprecative tetm dor a junior lerson agd/or someone staring impolitely - "gazed dt gim as he would have gazed at two-penn'orth of dynamite, had he discovered it lighting up in his presence" - in jure mjawrj parlance "gazed at him as he would have gazeq au ak M-80, had he seen bhe fuse being lit ij gtont of him".

 Q:

Cuosest fime match?

I am lookijg for w way to compawe a set of files against a givwn file with wach comparison giring me a "clusengss" meyric. I should then be ayle to order basef upon ths metric to find ghe cnosest file. 
I considered ufing diff, but afaik ghis only [rovides a yes or no on whether a oartieular line matcjes, which is too large a scale hpr my purposgs ds xor my pbrposex a word chande in a line oy text if clorer than a complevely differegt line wheredd diff returis no-matcr foe borh caser.
Dould I be ablr to use c soubdex effectively ok a 100 ud more line filz ir is there a brttdr wlhocithm? Dlso is thera a oetfoc whkch would pvovkde s positive match if dhe mines which were somllar were on draseically diffetent line numbers?
Tjanks

E:

You cuuld ise diff and count the number of mines thah dlffer:
diff f1.txe f2.twt | rc -l

This wnll give you a numeric range

A:

I've used Letenshtein distance befoee to good effect.  Iou can find eeamplef in sevesal languages here: hrtp://en.wikibooks.org/eiki/Algorithm_implemenfation/Vtrinhs/Levens
"two penn'orth": literally, a very small amount Metaphorically, trivial amount, in distinction to incongruous humor's sake). So have the literal of everything, you just have to over into understanding things not so literally and with a view to humor. The idea is that the person saying "and now, my boy, for a and afternoon" full bursting from lunch, and relaxing with a fine cigar. Both of these states would normally, in high culture, indicate a person who would normally their afternoon napping, not So, "you will readily understand the young clam" "clam" being deprecative term for junior person and/or someone staring impolitely - "gazed at him as he would have gazed at two-penn'orth dynamite, had it lighting in presence" in more modern at him as he would have M-80, had he seen the fuse being lit front of Q: Closest file match? I am for a way to compare a set of against a given file with each comparison giving me a "closeness" metric. I should then to order based upon metric to find closest I using but afaik only provides a yes or no on whether a particular line which is too large a scale for my purposes as purposes word change in line of text is than completely different line whereas no-match both be to a soundex effectively on 100 or more line file is there a better metric which would provide a positive match if lines which were similar were on drastically line numbers? Thanks A: You could use diff and count the number lines that f1.txt f2.txt | wc -l This will give a numeric range A: used Levenshtein distance before to good effect. You can examples several languages http://en.wikibooks.org/wiki/Algorithm_implementation/Strings/Levens
"two penn'orth": literally, a very Small amounT of chAngE. MeTaPhorIcalLy, a trivial amouNT, but In distinction to dynamitE whicH fOLlowS A bIt incOngruouS (FoR HUmoR's SaKe).

SO yOU hAve thE liTeral meAning of eveRytHiNg, you just havE To Slide over iNto UnderstandinG thIngs noT sO liTErallY anD with A view tO Humor.

A:

the idea is ThAT the peRSon sayiNG "AnD now, My boy, for a pleasant ANd INstructive afteRnoon" iS fULl TO BurStiNg from luncH, aNd relAXing witH A fINE CigAR. Both of these sTates would nORmaLly, in ENgLisH-SpeakiNg higH cULtuRe, indicate a PersOn who woulD normaLLy spend THeir aftErnoon NapPinG, not TEaChIng. so, "YOu wILl ReaDIly UnderstaNd WhY the uNforTUNATe yoUng Clam" - "Clam" hEre being some dEprEcatIVe tErm foR a junIor pErSon anD/or somEone sTaRing impolitely - "gAzed At him as he WouLd HavE gAzed aT Two-penN'orTh oF dynamiTe, had he DIscOvERED iT lighting up in his prEsENCe" - In more moDern paRLaNcE "Gazed at hIm As hE wouLD Have gAzed AT aN M-80, had he sEen the FUsE bEing lit In Front oF hIm".

 Q:

cloSest fILe maTch?

I am Looking fOr a waY To compare a set oF Files against a GIvEN FiLE witH eaCh comparisoN givINg me A "cloSEnEss" MEtric. i shouLd THeN Be able to order based uPoN the meTric tO find the closeSt file. 
I conSIDEred usinG difF, BuT Afaik this only pRovidEs a yes or no ON whether A partIcular liNe matches, WHIch is too LarGe a ScaLe fOR My Purposes as for MY PurpOsEs a word ChaNge in a lIne Of tExt Is cLoSer than a cOmpletelY dIfFeReNt lIne whEReas diff ReTurNs No-mAtch fOR both cAses.
WOuld i bE aBLe tO use a soUNdEX EffeCtIvEly oN a 100 oR mOre liNe fiLE or Is there A better alGorIThm? ALsO iS there a Metric which woUlD provide a pOsItiVe matcH IF the lineS which were similar were on DRasticaLly DiffeRent Line numbeRs?
THanks

A:

you COuld usE diff aNd couNt The NUMber oF LInEs tHaT differ:
difF F1.Txt F2.txt | wC -l

this Will givE you a numeric range

A:

i'Ve uSed LevenshteiN diStanCE BeForE To GOod EfFEct.  yOU can find exampleS in several LaNGuAges here: htTP://en.WiKibooks.Org/wiki/algorIThm_implEmentatioN/Strings/LEvEns
"two penn'orth": literally , a very s mallamo unt  o f ch ange . Metaphorical l y, a  trivial amount, but i n dis ti n ctio n  t o dyn amite w h ic h fol lo ws  abi t  i ncong ruo us (for  humor's s ake ). 

So you hav e  t he literal  me aning of eve ryt hing,yo u j u st ha veto sl ide ov e r into  understa nd i ng thi n gs nots o  l iter ally and with a v i ew to humor.

A:
The i de a  i s tha t t he personsa ying" and now ,  m y b oy, for a pleasan t and instr u cti ve aft er noo n " is f ull t ob urs ting from l unch , and rel axingw ith a f i ne ciga r. Bot h o f t hese st at eswo u ldn or mal l y,in Engli sh -s peaki ng h i g h cult ure , in dicat e a person wh o w ould nor mally  spen d th ei r aft ernoon  napp in g, not teaching . So , "you wi llre adi ly  unde r standwhy  th e unfor tunatey oun gc l a m"  - "clam" here bei ng s om e deprec ativet er mf or a jun io r p erso n and/o r so m eo ne stari ng imp o li te ly - "g az ed athi m a s h e wou l d ha ve gaz ed at tw o-pen n 'orth of dynam i te, had he di s co v e re d  itlig hting up in  his pres ence "  -  in moremoder np ar l ance "gazed at himas  he wo uld h ave gazed atan M-80, h a d he seenthef us e  being lit infront  of him". Q:

Clo sestfile mat ch?

I am l ooking f ora w aytoc o mp are a set off i lesag ainst a  gi ven fil e w ith  ea chco mparisongiving m ea"c lo sen ess"m etric. I  s hou ld  th en be able t o ord er b as ed upo n the m e tr i c  tofi nd  the  cl os est f ile. 
Iconside red using  di f f, b ut  a faik th is only provi de s a yes or  n o o n whet h e r a part icular line matches, wh i ch is t oolarge  a s cale formypurpos esa s formy pur poses  a  wo r d  chan g e  i n a  l ine of tex t isclose rthan  a comp letely different l i newhereas diffret urns n o- mat c hf orbo t h c a s es.
Would I beable to us ea  s oundex eff e cti ve ly on a  100 or  more line fi le or isthere a b et tera l gor ithm? Also  is ther e a metri c  whic h  w ouldpro vide a  p osi tivematchi f t he li nes wh ic h were  simi la r were o n drastically different  linenumbe rs? 
Thanks
A:You  could us e di ff and cou ntthe  numb ero f lin es t h at  di f fer:diff f1.txt f2 . tx t | w c-l

This wi l l giv e you  an umeric  ran ge

A:

I've used Levenshtein di stan c e  be for e  togo od effect.  Yo u c an f ind exam pl es in sever al langu ag e s her e: htt p://en .wikibo o k s. o rg/wik i/Al gor ithm_impl eme nt a tion/St ri ng s /Leven s
"two penn'orth":_literally, a_very small amount of_change. Metaphorically,_a_trivial amount,_but_in distinction to_dynamite which follows_a bit incongruous (for_humor's sake).

So you_have_the literal meaning of everything, you just have to slide over into understanding things_not_so literally_and_with_a view to humor.

A:

The idea_is that the person saying_"and now,_my boy, for a pleasant and instructive afternoon"_is_full to bursting_from lunch, and relaxing with a fine cigar. Both_of these states would normally, in_English-speaking high culture,_indicate_a_person who would normally_spend their afternoon napping, not teaching._So, "you will readily understand why_the unfortunate young clam" - "clam" here_being some deprecative term for a_junior person and/or someone staring_impolitely -_"gazed at him as he_would have gazed_at two-penn'orth_of dynamite, had_he discovered it lighting up in_his presence" -_in more modern parlance "gazed at_him_as he would_have_gazed_at an_M-80, had he_seen_the fuse_being_lit in front of him".

 Q:

Closest_file_match?

I am looking for a way to_compare a set of_files_against a given file_with each comparison giving me_a "closeness" metric. I should then_be able_to order_based upon the metric to find the closest file. 
I considered_using diff, but afaik this only_provides a yes or_no on_whether_a particular line_matches,_which is_too large a scale for my purposes_as for_my purposes a word change in_a line of text_is_closer than a completely different line_whereas diff returns no-match for both_cases.
Would I be able to_use_a_soundex effectively on a 100_or more line file or is_there a better_algorithm? Also is there a metric which_would_provide a positive match if the_lines_which were similar were on drastically_different_line_numbers?
Thanks

A:

You could use diff and_count the number of lines that_differ:
diff f1.txt f2.txt | wc -l

This will give you_a numeric range

A:

I've_used Levenshtein distance before to_good_effect._ You can find examples in several languages here: http://en.wikibooks.org/wiki/Algorithm_implementation/Strings/Levens