How to match all array contents and display all highest matched sentences in perl?
Hi,
I have an array with 3 words in it and i have to match all the array contents and display the exact matched sentence i.e all 3 words should match with the sentence.
Here are sentences.
I want all there 3 words to be matched and that sentence has to printed first.
Here are the words. I tried like this:
Just stuck up here!!
The output should be like this:
How can i match all these words and print the sentence with highest match (all the words matching the sentence) in perl??
Hi,
I have sentences like this:
$sent=
Protein modeling studies reveal that the RG-rich region is part of a three to four strand antiparallel beta-sheet, which in other RNA binding protein functions as a platform for nucleic acid interactions.
Heterogeneous nuclear ribonucleoparticle... (19 Replies)
Just wondering if there's a better way to get these complete sentences into an array and keep the quotes intact? All the quotes make it look ugly to me but it works. I want to be able to refer to the full sentences by index. I've tried a few qw and qq/ aproaches but what I have below seems about... (4 Replies)
Hi i have just registered
So i am at university studying forensic computing and we have to learn c++
i have never done anything with c++ before and i am abit stuck
i need to create a programme to display the contents of an array of characters forwards and in reverse
Can anyone help me... (1 Reply)
Basically to illuminate i want to take a file with mutliple lines,
C:\searching4theseletters.txt
a
b
c
Read this into an array
@ARRAY
and then use this to compare against another file
C:\inputletters.txt
b
o
a
c
n
a (9 Replies)
I'm currently working with dozens of FASTA files, and I'm tired of having to manually change the filename in my Perl script.
I'm trying to write a simple Perl script that'll create a 2-dimensional array containing the name of the folders and its contents.
For example, I would like the output... (6 Replies)
Hi there
I have a counter called
my $counter = 0;
I am trying to build an array that will have a name that is for example
my @array0 = ("some", "stuff");
but instead of hard coding the "0" in the array name i want to use whatever value the aforementioned $counter has in it...so
... (1 Reply)
Hi ,
I have been trying to write a perl script to do this job. But i am not able to achieve the desired result. Below is my code.
my $current_value=12345;
my @users=("bob","ben","tom","harry");
open DBLIST,"<","/var/tmp/DBinfo";
my @input = <DBLIST>;
foreach (@users)
{
my... (11 Replies)
ksh
eg
arrayname=(1 2 3 4 5)
I'm trying to display the individual contents of an array on a new line without using a loop, using one line of code.
output
1
2
3
4
5 (3 Replies)
Hi
I have two lists of patterns named A and B consisting of around 200 entries in each and I want to extract all the sentences from a big text file which match atleast one pattern from both A and B.
For example, pattern list A consists of :
ama
ani
ahum
mari
...
...
and pattern... (1 Reply)
Discussion started by: my_Perl
1 Replies
LEARN ABOUT DEBIAN
diction
DICTION(1) User commands DICTION(1)NAME
diction - print wordy and commonly misused phrases in sentences
SYNOPSIS
diction [-b] [-d] [-f file [-n|-L language]] [file...]
diction [--beginner] [--ignore-double-words] [--file file [--no-default-file|--language language]] [file...]
diction -h|--help
diction --version
DESCRIPTION
Diction finds all sentences in a document that contain phrases from a database of frequently misused, bad or wordy diction. It further
checks for double words. If no files are given, the document is read from standard input. Each found phrase is enclosed in [ ] (brack-
ets). Suggestions and advice, if any and if asked for, are printed headed by a right arrow ->. A sentence is a sequence of words, that
starts with a capitalised word and ends with a full stop, double colon, question mark or exclaimation mark. A single letter followed by a
dot is considered an abbreviation, so it does not terminate a sentence. Various multi-letter abbreviations are recognized, they do not
terminate a sentence as well, neither do fractional numbers.
Diction understands cpp(1) #line lines for being able to give precise locations when printing sentences.
OPTIONS -b, --beginner
Complain about mistakes typically made by beginners.
-d, --ignore-double-words
Ignore double words and do not complain about them.
-s, --suggest
Suggest better wording, if any.
-f file, --file file
Read the user specified database from the specified file in addition to the default database.
-n, --no-default-file
Do not read the default database, so only the user-specified database is used.
-L language, --language language
Set the phrase file language.
-h, --help
Print a short usage message.
--version
Print the version.
ERRORS
On usage errors, 1 is returned. Termination caused by lack of memory is signalled by exit code 2.
EXAMPLE
The following example first removes all roff constructs and headers from a document and feeds the result to diction with a German database:
deroff -s file.mm | diction -L de | fmt
ENVIRONMENT
LC_MESSAGES=de|en
specifies the message language and is also used as default for the phrase language. The default language is en.
FILES
/usr/share/diction/* databases for various languages
AUTHOR
This program is GNU software, copyright 1997-2005 Michael Haardt <michael@moria.de>.
The English phrase file contains contributions by Greg Lindahl <lindahl@pbm.com>, Wil Baden, Gary D. Kline, Kimberly Hanks and Beth Morris.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER-
CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
HISTORY
There has been a diction command on old UNIX systems, which is now part of the AT&T DWB package. The original version was bound to roff by
enforcing a call to deroff. This version is a reimplementation and must run in a pipe with deroff(1) if you want to process roff docu-
ments. Similarly, you can run it in a pipe with dehtml(1) or detex(1) to process HTML or TeX documents.
SEE ALSO deroff(1), fmt(1), style(1)
Cherry, L.L.; Vesterman, W.: Writing Tools--The STYLE and DICTION programs, Computer Science Technical Report 91, Bell Laboratories, Murray
Hill, N.J. (1981), republished as part of the 4.4BSD User's Supplementary Documents by O'Reilly.
Strunk, William: The elements of style, Ithaca, N.Y.: Priv. print., 1918, http://coba.shsu.edu/help/strunk/
GNU June 09, 2006 DICTION(1)