https://github.com/observedobserver/writingstyleanalysis
writing style analysis; relationship analysis
https://github.com/observedobserver/writingstyleanalysis
Last synced: 10 months ago
JSON representation
writing style analysis; relationship analysis
- Host: GitHub
- URL: https://github.com/observedobserver/writingstyleanalysis
- Owner: ObservedObserver
- Created: 2017-06-21T11:57:15.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-01T23:04:51.000Z (about 8 years ago)
- Last Synced: 2025-02-13T20:14:31.784Z (12 months ago)
- Language: Python
- Homepage:
- Size: 3.2 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Writing Style Analysis
Novels.py provides a class Novel with many useful methods.(including the SNA in novels)
Analysis.py mainly provide method to calculate the td-idf of words in each novel.
run analysis.py with python3
check war_peace_term_frequency.json
or
Here are several api in the code.
```
import Novels
book = Novels.Novel("war_peace.txt")
book.term_frequency()
book.time_density("Prince Valisi")
book.grades("Prince Valisi","Princess Anna")
import Analysis
tf-idf(["war_peace.txt","flatland.txt","the_old_man_and_the_sea.txt"])
```


Blog: http://ooerx.lofter.com/post/1ec94e0f_1041b25a