Jump to content

PHP Script for Advanced Language Analysis


Rahvasaadik

Recommended Posts

Hi people.

 

I was wondering, could somebody kind enough help me make a script with which to analyse some written text and output its' statistical results into a .txt file?

 

I am doing a paper for my english linguistics course and I need to analyse a large ammount of text and different aspects about it, then output the results into a text file for further statistical analysis.

 

I admit I have no proper knowledge of PHP whatsoever, so the help I'm asking for would be quite significant...  :-\

The script should somehow take a txt file, which contains some text, and then find out these following aspects about it:

1) Letter count

2) Word count

3) Sentence count

4) The average of words in a sentence

5) How many times a vowel has been found before a consonant in a word (summary statistics)

6) How many times a consonant has been found before a consonant in a word (summary statistics)

7) The sum of "a" found before "b", the sum of "a" found before "c", the sum of "a" found before "d" and so forth, with all the other letters (i.e. The letter "g" was found 362 times before the letter "e")

8 ) The sum of words with different lengths (i.e. Words, which are 5 letters long, were found 113 times)

9) The average length of words

10) The sum of percentual relation of vowels to consonants in all the words found.

11) The repeat of analysis conducted above, but with multiple instances of the same word removed (so there are no repeating words in the text on which the analysis is to be conducted.)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.