Rahvasaadik Posted August 14, 2009 Share Posted August 14, 2009 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... :-\ Quote Link to comment https://forums.phpfreaks.com/topic/170240-php-script-for-advanced-language-analysis/ Share on other sites More sharing options...
Daniel0 Posted August 14, 2009 Share Posted August 14, 2009 Given that you are the linguist and we are the programmers, why don't you tell us what doing "Advanced Language Analysis" constitutes? Quote Link to comment https://forums.phpfreaks.com/topic/170240-php-script-for-advanced-language-analysis/#findComment-898028 Share on other sites More sharing options...
Rahvasaadik Posted August 15, 2009 Author Share Posted August 15, 2009 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.) Quote Link to comment https://forums.phpfreaks.com/topic/170240-php-script-for-advanced-language-analysis/#findComment-898722 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.