I am translating your requirement to mean count all of the . ! and ? characters in a file.
This is part of what it means to find sentences. It will have problems, ex.: in text with numbers that have decimals in them. And sentences that end in an ellipsis.... < that is one! Neat. I made a self-referential sentence.
You have to decide on the correctness of your approach, based on your data.
This User Gave Thanks to jim mcnamara For This Post:
Thank you very much for the code
I have to break the files into sentence per line as well and dont want it to divide the lines if there is a word or number of the "." so i have to know how to identify it.
can you explain this bit please?
Location: Saint Paul, MN USA / BSD, CentOS, Debian, OS X, Solaris
Posts: 2,288
Thanks Given: 430
Thanked 480 Times in 395 Posts
Hi.
Quote:
Originally Posted by A-V
... I have to break the files into sentence per line as well and dont want it to divide the lines if there is a word or number of the "." ...
I have been looking at the topic of processing English sentence lately. Here is a demonstration of a perl script to place sentences on separate lines (minimal version):
producing:
The file uploaded needs to be copied to file minimal-sese and then made executable. The perl module Lingua/EN/Sentence.pm may be available in your repository. Otherwise it needs to be copied from the URL noted in the script comments.
Posting samples of your input and desired output will help invite on-point solutions.
Hi,
Very good wishes to all!
Please help to provide the shell script for generating the record counts in filed wise from the .csv file
My question:
Source file:
Field1 Field2 Field3
abc 12f sLm
1234 hjd 12d
Hyd 34
Chn
My target file should generate the .csv file with the... (14 Replies)
hi All, Any one answer my requirement.
I have source location
src_dir="/home/oracle/arun/IRMS-CM"
My Target location
dest_dir="/home/oracle/arun/LiveLink/IRMS-CM/$dc/$pc/$ct"
my source text files check with below example.text file content
$fn "\t" $dc "\t" $pc "\t" ... (3 Replies)
Hi,
Am trying to get a normalized date value irrespective of the time zone of the machine in which following code is run.
When the following code is run in 2 different machines with TZ=UTC and TZ=PDT, I get 2 different values.
I simply want to normalize the output that is specific to a... (3 Replies)
I would like to check with grep in this configuration file:
{
"alt-speed-down": 200,
"alt-speed-enabled": true,
"alt-speed-time-begin": 1140,
"alt-speed-time-day": 127,
"...something..." : true,
...
}
"alt-speed-enabled" (the third line of the file) is setted to... (2 Replies)
I was wondering if anyone could help me with this problem:
Write a script called countFiles that takes two arguments, the initial directory and the number of levels and returns the count of all files (including directories) in the directories and subdirectories up to the number of levels.
... (4 Replies)
Hi,
Please let me know how to find out number of files in a directory excluding existing files..The existing file format will be unknown..each time..
Thanks (3 Replies)
Hello experts,
I used following approach to get listing of all files of remote server.
Now I have remote server file information on same server.
I am getting listing in the output.txt
I want to count today's created files and old files.
I want to compare the numbers... (11 Replies)
Hi People,
I need some Help to write a unix script that asks for a sentence to be typed out then with the sentence. Counts the number of spaces within the sentence and then echo's out "The Number Of Spaces In The Sentence is 4" as a example
Thanks
Danielle (12 Replies)