Documentation (API) - dipanshu231099/CS308-Lab3-Text-Software GitHub Wiki
API Documentation
A text analysis and plotting tool
Credits
The API is maintained and developed by Dipanshu (B18054)
Functions
The following are the defined functionalities enabled in the API:
-
removePunctuations(string)
- INPUT: String
string
- RETURNS: String
- USAGE: removing punctuation marks from a string
- INPUT: String
-
removeEmptyLines(lines)
- INPUT: Array of Strings
lines
- RETURNS: None
- USAGE: removing empty lines from a string
- INPUT: Array of Strings
-
wordMapper(textFile,debug=0)
- INPUT: File Path (absolute preffered), (optional) debug mode
- RETURNS: Dictionary
- USAGE: Function to make a count of all words only in the text. Ignores any punctutation marks. The case is ignored.
-
lineNumbers(textFile, token, debug=0)
- INPUT: File Path, String
token
, (optional) debug mode - RETURNS: Array of integers
- USAGE: Function to find the lines containing a particular token word. The function is not case sensitive.
- INPUT: File Path, String
-
mostOccuringWords(textFile, debug=0)
- INPUT: File Path (absolute preffered), (optional) debug mode
- RETURNS: Array of Strings
- USAGE: To produce a List of most occuring words
-
leastOccuringWord(textFile, debug=0)
- INPUT: File Path (absolute preffered), (optional) debug mode
- RETURNS: Array of Strings
- USAGE: To produce a List of least occuring words
-
lineCounter(textFile, debug=0)
- INPUT: File Path (absolute preffered), (optional) debug mode
- RETURNS: Integer
- USAGE: Count of number of lines in a file
-
WordCounter(textFile, debug=0)
- INPUT: File Path (absolute preffered), (optional) debug mode
- RETURNS: Integer
- USAGE: Count of number of words in a file (except Articles 'a' 'an' 'the')