Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/qlint/word-rank
Ranks words from a text file in order of frequency of appearance.
https://github.com/qlint/word-rank
filesystem php word-count word-frequencies word-ranking
Last synced: 5 days ago
JSON representation
Ranks words from a text file in order of frequency of appearance.
- Host: GitHub
- URL: https://github.com/qlint/word-rank
- Owner: qlint
- Created: 2017-06-24T13:37:51.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-06-24T14:11:42.000Z (over 7 years ago)
- Last Synced: 2024-11-07T19:35:45.777Z (about 2 months ago)
- Topics: filesystem, php, word-count, word-frequencies, word-ranking
- Language: PHP
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# word-rank
This project ranks the frequency of words in a text file in order descending order,that is, from words appearing the most to the least. It is written in pure PHP.# getting-started
Simply upload your files in the docs folder and have the first file named one.txt . The other file names don't matter.The code is divided in two segments.
The first segment only reads the first file - one.txt - and ranks all the words indicating the number of appearances.The second segment reads through all the files and outputs the total ranks in order of number of appearances of all the words from all the files in the docs directory.
# note
The output has been limited to 100 to for easy readability when large text files are used.