Loading...
Please wait, while we are loading the content...
Similar Documents
Classification of Fiction Genres Text classification of fiction texts from Project Gutenberg
| Content Provider | Semantic Scholar |
|---|---|
| Author | Bucher, Rolf |
| Copyright Year | 2019 |
| Abstract | Stylometric analysis in text classification is most often used in authorship attribution studies. This thesis used a machine learning algorithm, the Naive Bayes Classifier, in a text classification task comparing stylometric and lexical features. The texts were extracted from the Project Gutenberg website and were comprised of three genres: detective fiction, fantasy, and science fiction. The aim was to see how well the classifier performed in a supervised learning task when it came to discerning genres from one another. R was used to extract the texts from Project Gutenberg and Python script was used to run the experiment. Approximately 1978 texts were extracted and preprocessed before univariate filtering and tf-idf weighting was used as the lexical feature while average sentence length, average word length, number of characters, number of punctuation marks, number of uppercase words, number of title case words, and parts-of-speech tags for nouns, verbs, and adjectives were generated as the feature sets for the topic independent stylometric features. Normalization was performed using the l2 norm for the tf-idf weighting, with the l2 norm and z-score standardization for the stylometric features. Multinomial Naive Bayes was performed on the lexical feature set and Gaussian Naive Bayes on the stylometric set, both with 10-fold cross-validation. Precision was used as the measure by which to assess the performance of the classifier. The classifier performed better in the lexical features experiment than the stylometric features experiment, suggesting that downsampling, more stylometric features, as well as more classes would have been beneficial. Stylometrisk analys i textklassificering används oftast i författarskapsstudier. Denna avhandling använde en maskininlärningsalgoritm, Naive Bayes Classifier, i en textklasseringsuppgift som jämförde stilometriska och lexiska funktioner. Texterna extraherades från Project Gutenbergs hemsida och bestod av tre genrer: detektivfiktion, fantasi och science fiction. Syftet var att se hur bra klassificeringen utfördes i en övervakad inlärningsuppgift när det gällde att skilja genrer från varandra. R användes för att extrahera texterna från Project Gutenberg och Python-skript användes för att köra experimentet. Cirka 1978-texter extraherades och förbehandlades innan univariat filtrering och tf-idf-viktning användes som lexikala särdrag, medan längd för ordlängd, genomsnittlig ordlängd, antal tecken, antal skiljetecken, antal stora bokstäver, antal titelord, och delar av talkoder för substantiv, verb och adjektiv genererades som funktionen för de ämnesoberoende stilometriska funktionerna. Normalisering utfördes med l2-normen för tf-idf-viktningen, med l2 norm och z-poäng standardisering för de stilometriska funktionerna. Multinomial Naive Bayes utfördes på den lexiska funktionen och Gaussian Naive Bayes på den stilometriska uppsättningen, båda med 10-faldig kryssvalidering. Precision användes som en åtgärd för att bedöma klassificatorns prestanda. Klassificeringsenheten fungerade bättre i experimentet med lexikala funktioner än I |
| File Format | PDF HTM / HTML |
| Alternate Webpage(s) | http://hb.diva-portal.org/smash/get/diva2:1305700/FULLTEXT01.pdf |
| Language | English |
| Access Restriction | Open |
| Content Type | Text |
| Resource Type | Article |