Skip to content

Analyze Kialo discussions' text files and obtain structured JSON files

License

Notifications You must be signed in to change notification settings

edoguido/Kialo-Parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kialo Parser

Kialo is a great platform. Unfortunately, it's really not so easy to analyze its data, since the only file that can be downloaded (scraping is not permitted) is in .txt format.

This python script takes two arguments:

kialo_parser.py path/to/input.txt path/to/output.json

and uses regular expressions to analyze the input Kialo's discussion data, storing different components in a json file, which has the following keys:

  • "Tree": current comment's tree indicator, in the form of [n1].[n2]...[nr] where n is an integer, and r is the level subdivision of such tree.
  • "Level": is the current comment's level, where 1 is the first sub-level, generally one "Pro" and one "Con" comment.
  • "Stance": indicates if the comment is Pro or Con.
  • "ToneInput": is the text content of the comment. The name is already set if the json is then used for IBM's Tone Analyzer

Upon execution, the program will ask whether the user wants to use IBM's Tone Analyzer after extracting Kialo's data from the provided .txt file.

The required data in order to use IBM's services are:

  • The API key or User/Pass combination.
  • The URL where the IBM's server is located (and which has been selected during the resource creation process, in the personal IBM page).

About

Analyze Kialo discussions' text files and obtain structured JSON files

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages