Sponsored Content
Full Discussion: Find Syllable count mismatch
Top Forums Shell Programming and Scripting Find Syllable count mismatch Post 303029520 by RudiC on Monday 28th of January 2019 09:44:48 AM
Old 01-28-2019
C'mon, gimley, with 301 post you should know that it is appreaciated in here if you show your attempts and where and how they fail / goof.
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

comparing two files and find mismatch

hi i have two files and i want to compare both the files and find out mismatch in 3rd file file1 00354|1|0|1|1|0|0|0|1|2 52424|1|0|1|1|0|0|0|1|2 43236|1|0|1|1|0|0|0|1|2 41404|1|0|1|1|0|0|0|1|2 79968|1|0|1|1|0|0|0|1|2 file2 00354|1|0|1|1|0|0|0|1|2 52424|1|0|1|1|0|0|0|0|2... (9 Replies)
Discussion started by: dodasajan
9 Replies

2. Shell Programming and Scripting

To find String mismatch

Hi, I have a doubt when searching files for the existence of a particular key. I have a property file has data with key and value pair like below and i call it as property file.ini here are the contents in File: popertyfile.ini location.property=2 agent.method=begin newkey=23 ... (2 Replies)
Discussion started by: raghu.amilineni
2 Replies

3. Shell Programming and Scripting

Creating a syllable concordance

Hello, I have two files. The first file contains specific syllables of a language (Hindi) and the second file contains a large database from which these syllables have been culled. The syllable file which has syllables in Hindi has one syllable per line and the corpus file has a data... (8 Replies)
Discussion started by: gimley
8 Replies

4. Shell Programming and Scripting

Syllable splitter in Perl

Hello, I am a relative newbie and want to split Names in English into syllables. Does anyone know of a perl script which does that. Since my main area is linguistics, I would be happy to add rules to it and post the perl script back for other users. I tried the CPan perl modules but they don't... (6 Replies)
Discussion started by: gimley
6 Replies

5. UNIX for Dummies Questions & Answers

Files count mismatch when used with Tar with find

Hi I have used the below steps and found some discrepancies step 1 : find ./ -type f -mtime +7 -name "*.00*" | wc -l = 13519 ( total files ) ( the size of this files is appx : 10GB ) step 2: find ./ -type f -mtime +7 -name "*.00*" | xargs tar zcvf Archieve_7.tar.gz step... (7 Replies)
Discussion started by: rakeshkumar
7 Replies

6. Shell Programming and Scripting

Count mismatch in UNIX

Hi, I have a requirement like below. client is sending the .txt filles.In that file we have 10 records but when I execute the below command it is showing 9 records. klena20> wc -l sample_file.txt|awk '{print $1}' It is showing the output as 9 But in a file records are 10. I found... (7 Replies)
Discussion started by: kirankumar
7 Replies

7. Shell Programming and Scripting

awk to output match and mismatch with count using specific fields

In the below awk I am trying output to one file those lines that match between $2,$3,$4 of file1 and file2 with the count in (). I am also trying to output those lines that are missing between $2,$3,$4 of file1 and file2 with the count of in () each. Both input files are tab-delimited, but the... (7 Replies)
Discussion started by: cmccabe
7 Replies

8. UNIX for Beginners Questions & Answers

How to find the count of IP addresses that belong to different subnets and display the count?

Hi, I have a file with a list of bunch of IP addresses from different VLAN's . I am trying to find the list the number of each vlan occurence in the output Here is how my file looks like 1.1.1.1 1.1.1.2 1.1.1.3 1.1.2.1 1.1.2.2 1.1.3.1 1.1.3.2 1.1.3.3 1.1.3.4 So what I am trying... (2 Replies)
Discussion started by: new2prog
2 Replies
Coy(3pm)						User Contributed Perl Documentation						  Coy(3pm)

NAME
Coy - like Carp only prettier SYNOPSIS
# In your application: # ==================== use Coy; warn "There seems to be a problem"; die "Looks like it might be fatal"; # You can add vocab in the $HOME/.coyrc file: # =========================================== noun RESET; # REMOVE EXISTING noun VOCAB # WORKS FOR OTHER SPECIFIERS TOO noun { wookie => { category => [ Sentient ], sound => [ "roars", "grunts", "bellows" ], act => { sits => { location => Arborial }, fights => { minimum => 2, association => "argument", }, }, }, }; category { Sentient => { act => { quarrels => { associations => "argument", location => Terrestrial, minimum => 2, synonyms => [qw(bickers argues)], }, laughs => { associations => "happy", location => Terrestrial, non_adjectival => 1, }, }, } }; personage "R2D2"; personage "Darth Vader"; place "Mos Eisley"; place "the Death Star"; tree "Alderaan mangrove"; fruit_tree "Wookie-oak"; # You can also select a different syllable counter via .coyrc # =========================================================== use Lingua::EN::Syllables::syllable; syllable_counter "Lingua::EN::Syllables::syllable"; # or use Lingua::EN::Syllables::syllable; syllable_counter &Lingua::EN::Syllables::syllable; # or syllable_counter sub { return 1 }; # FAST BUT INACCURATE DESCRIPTION
Error messages strewn across my terminal. A vein starts to throb. Their reproof adds the injury of insult to the shame of failure. When a program dies what you need is a moment of serenity. The Coy.pm module brings tranquillity to your debugging. The module alters the behaviour of C<die> and C<warn> (and C<croak> and C<carp>). It also provides C<transcend> and C<enlighten> -- two Zen alternatives. Like Carp.pm, Coy reports errors from the caller's point-of-view. But it prefaces the bad news of failure with a soothing haiku. The haiku are not "canned", but are generated freshly every time. Once the haiku is complete, it's prepended to the error message. Execution of the original call to C<die> or C<warn> resumes. Haiku and error message strew across my screen. A smile starts to form. EXTENDING THE VOCABULARY
Any code placed in "$ENV{HOME}/.coyrc" runs at compile-time. You can use that file to extend Coy.pm's vocabulary. The "SYNOPSIS" at the start of this POD shows how you might set it up. (Eventually this section will detail the full mechanism.) CHANGING THE SYLLABLE COUNTER
Real haiku often <BR> have imperfect syllable<BR> counts. The deficiencies of<BR> Coy's inbuilt counter are thus<BR> artistic virtues. But some connoisseurs<BR> demand their syllable counts<BR> be always exact. So if you don't like<BR> the syllable counter, Coy<BR> let's you replace it. Coy provides a sub called C<syllable_counter> for that very purpose. It is passed a sub reference. That sub is then used to count syllables. You can also pass the sub's I<name> (that is, pass a symbolic reference). The new counter sub should take a string and return its syllable count. C<syllable_counter> can be called from your code, or from .coyrc. BUGS AND LIMITATIONS
In its current form, the module has four problems and limitations: * Vocabulary: The list of nouns and verbs is too small at present. This limits the range of topics that the haiku produced can cover. That in turn leads to tell-tale repetition (which fails the Turing test). Extending the range of words Coy.pm can use is no problem (though finding the time and the creativity required may be :-). Users of Coy are encouraged to add their own vocabulary. (See the "SYNOPSIS", and also "EXTENDING THE VOCABULARY"). * Associations: The vocabulary has too few topic links. Hence it's often not able to find relevant words for a message. This leads to haiku utterly unrelated to the error text. Again, there is no technical difficulty in adding more links: Defining enough associations isn't hard, just tedious. User-specified vocabularies can solve this problem as well. * Limited grammar: The number of syntactic templates is too small. This leads to haiku that are (structurally, at least) monotonous. Yet again, this needs no technical solution, just time and effort. Of course, such enhanced templates might require richer vocabulary. For example, verb predicates would need extra database structure: Each verb entry would have to be extended with links to object nouns. * Syllable counting: This is perhaps the major problem at present. The algorithmic syllable counter is still being developed. It is currently around 96% accurate (per word). This means that correct syllable counts for haiku can't be guaranteed. Syllable counts for single words are correct to plus-or-minus 1. In a multi-word haiku these errors cancel out in most cases. Thus, the haiku tend to be correct within one or two syllables. As the syllable counter slowly improves, this problem will abate. Alteratively, you can choose to use your own syllable counter. (See above in the section titled "CHANGING THE SYLLABLE COUNTER".) AUTHOR
The Coy.pm module was developed by Damian Conway. COPYRIGHT
Copyright (c) 1998-2000, Damian Conway. All Rights Reserved. This module is free software. It may be used, redistributed and/or modified under the terms of the Perl Artistic License (see http://www.perl.com/perl/misc/Artistic.html) perl v5.8.8 2007-07-30 Coy(3pm)
All times are GMT -4. The time now is 12:19 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy