Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Perl Modules

    Text::Conversation 0.050

    Download button

    No screenshots available
    Downloads: 336  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Rocco Caputo | More programs
    Perl Artistic License / FREE
    August 31st, 2011, 12:47 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Text::Conversation description

    Turn a conversation into threads, one line at a time.

    Text::Conversation is a Perl module to turn a conversation into threads, one line at a time.

    SYNOPSIS

     #!perl

     use warnings;
     use strict;
     use Text::Conversation;

     my $threader = Text::Conversation->new();

     my %messages;

     while () {
     next unless
     my ($speaker_name, $their_text) = /^(S+)s+(S.*?)s*$/;

     my ($this_message_id, $referent_message_id) =
     $threader->observe($speaker_name, $their_text);
     $messages{$this_message_id} = " $their_text";

     print $messages{$this_message_id}, "
    ";
     if ($referent_message_id) {
     print " refers to: $messages{$referent_message_id}
    ";
     }
     else {
     print " doesn't refer to anything.
    ";
     }
     }


    Text::Conversation attempts to thread conversational text one line at a time. Given a speaker's ID (often a name, screen name, or other relatively unique identifier) and the text of their message, it attempts to find the most likely message they are referring to. It will also indicate times when it cannot find a referent.

    The most common question so far is "How does it work?" That's often followed by the leading "Does it just look for another speaker's ID at the start of the message?" Text::Conversation uses multiple heuristics to determine a message's referent. To be sure, the presence of another speaker's ID counts for a lot, but so common words between two messages. Consider them similar to quoted text in an e-mail message.

    Text::Conversation also keeps track of people who have spoken to each other, either explicitly or implicitly. Chances are good that an otherwise undirected message is aimed at a person is part of an ongoing conversation.

    The module also incorporates penalties. The link between two messages is degraded more as the module searches farther back in time. Likewise, there are penalties for referring to messages beyond the speaker's previous message, or the addressee's.

    Text::Conversation is considered by its author to be "beta" quality code. The heuristics are often uncannily accurate... if you steadfastly ignore their shortcomings. I am trapped in a module factory. Please send feedback and patches.


    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    threaded conversation | text conversation | Perl module | Perl | text | conversation

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM