Finding the most frequently occurring set of words
Hi guys, I have a file with a list of phoneme for words, it looks like this:
and I need to find the phoneme pattern that corresponds to the largest number of words.
So for the above section of the list, the output would be
because it occurred three times. How should I do this?
Also, how can I find the line with the most phonemes in this list? The output just needs to be the number of phonemes and the actual line, like:
or something similar
Assuming that the patterns in
are
A list of of the occuring patterns sorted from most most common to least, ties sorted in increasing alphabetical order can be done with:
If only the very first result is of interest append a head filter to the previous pipeline:
If the count is of no interest:
Regards,
Alister
Hi
I have two files. One is a text file consisting of sentences i.e. INPUT.txt and the second file is SEARCH.txt consisting of two or three columns. I need help to write a script to search the second column of SEARCH.txt for each set of five words (blue color as set one and green color as set... (6 Replies)
Hi ,
I need to count the number of errors associated with the two words occurring in the file. It's about counting the occurrences of the word "error" for where is the word "index.js". As such the command should look like. Please kindly help. I was trying: grep "error" log.txt | wc -l (1 Reply)
Hi All,
I am completely stuck here.
I have a set of files (with names A.txt, B.txt until L.txt) which contain words like these:
computer
random access memory
computer networking
mouse
terminal
windows
All the files from A.txt to L.txt have the same format i.e. complete words in... (2 Replies)
Got a question for you guys...I am searching through a public directory (that has tons of files) trying to find a file that I was working on a longggggg time ago. I can't remember what it is called, but I do remember the content. It should contains words like this:
Joe
Pulvo
botnet
zeus... (5 Replies)
Hi All,
I tried this but I am having trouble formulating this:
I have a file that looks like this (this is a sample file words can be different):
network
router
frame
network
router
computer
card
host
computer
card
One can see that in this file "network" and "router" occur... (3 Replies)
i want to write a shell script that correct a text file.for example if i have the input file:
"john has has 2 apples
anne has 3 oranges oranges"
i want that the output file be like this:
"john has 2 apples
anne has 3 oranges"
i've tried to read line by line from input text file into array... (11 Replies)
Greetings.
I am a UNIX newbies.
I am currently facing difficulties dealing with a large data set and I would like to ask for helps. I have a input file like this:
ak 1 AAM1
ak 2 AAM1
ak 3 AAM1
ak 11 AMM2
ak 12 AMM2
ak 13 AMM2
ak 14 AMM2
Is there any possibility for me to... (7 Replies)
I need Display the most top 10 occurring words along with the number of occurences of those words in the given text.
Sample text as below:
"The Travails of Single South Indian men of conservative upbringing" or "Why we don't get any..."
Yet another action packed weekend in Mumbai, full of... (2 Replies)
hi,
cud u help me to find this.
i hav 2 files.
file1 has data as "ARUN
ARUN is from Australia
Arun likes America etc..
ARUN ARUN "
file2 has "ARUN
Australia
America"
i... (5 Replies)