Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

RE: RE: Re: Tri-grams?
-----Original Message-----
From: amit hetawal [mailto:amit_h123@rediffmail.com]
Sent: Wednesday, February 22, 2006 16:00
To: Wagner, David --- Senior Programmer Analyst --- WGO
Subject: Re: RE: Re: Tri-grams?



hi there
the sequnce with alpha _ _ is valid but not _ _ _



I replaced the 4 four lines in your program with the following four lines.
 
next if ( $char !~ /[a-z]/i );
my $char2 = substr $_, $ii+1, 1;
next if ( $char2 !~ /[a-z ]/i );
my $char3 = substr $_, $ii+2, 1;
next if ( $char3 !~ /[a-z ]/i );

 
Changed the input to
 
$_ = ' hello. how  a,re you hel?lo ';
 
Output:
$\%hash = {
'e y' => 1,
'ell' => 1,
'hel' => 2,
'how' => 1,
'llo' => 1,
'lo ' => 1,
'ou ' => 1,
'ow ' => 1,
're ' => 1,
'u h' => 1,
'w  ' => 1,
'you' => 1
};
 
Wags ;)



On Thu, 23 Feb 2006 Wagner,David --- Senior Programmer Analyst --- WGO wrote :
>Unclear in that are you saying? Is a__ where _ is a space is valid or can t
hree spaces be valid? So are you working with only alpha and spaces or alpha
, numbers and spaces?
>
>Wags ;)
>
>-----Original Message-----
> From: perl-win32-users-bounces@listserv.ActiveState.com [mailto:perl-win32
-users-bounces@listserv.ActiveState.com]On Behalf Of amit hetawal
>Sent: Wednesday, February 22, 2006 12:09
>To: $Bill Luebkert
>Cc: perl-win32-users@listserv.ActiveState.com
>Subject: Re: Re: Tri-grams?
>
>
>
>
>
>
>On Wed, 22 Feb 2006 $Bill Luebkert wrote : 
>
>Hello Bill
>Thanks for your help...
>i got the initial part running but now i have so read the text from a large
 text file havin all the sentences and special characters and in that i have
 to get the trigrams working and not only for the above text ...can you plea
se suggest how should i format the file and access the hash values whichi st
ore for all of the whole text ...
>a tri gram with 'ab_' will also work since i have to consider the space asa
 character ...too..
>please help :(
>thanks..
>
>
>
>
>  <http://adworks.rediff.com/cgi-bin/A...ddle5?PARTNER=3>
>
>
>
> ****************************************
***************
>This message contains information that is confidential
>and proprietary to FedEx Freight or its affiliates.
>It is intended only for the recipient named and for
>the express purpose(s) described therein.
>Any other use is prohibited.
> ****************************************
***************
>




<http://adworks.rediff.com/cgi-bin/A...ddle5?PARTNER=3>  



 ****************************************
***************
This message contains information that is confidential
and proprietary to FedEx Freight or its affiliates.
It is intended only for the recipient named and for
the express purpose(s) described therein.
Any other use is prohibited.
 ****************************************
***************



Report this thread to moderator Post Follow-up to this message
Old Post
Wagner, David --- Senior Programmer Analyst --- WG
02-22-06 11:56 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PERL Beginners archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 08:17 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.