From 381224aea4896a89dea254066ea0f9dfed797142 Mon Sep 17 00:00:00 2001 From: schneider Date: Wed, 28 Aug 2024 19:12:38 +0200 Subject: [PATCH] added pypi package prerequisites --- README.md | 6 ++++++ example_chiasmus.sh | 2 +- pyproject.toml | 17 +++++++++++++++++ {code => src}/AlliterationAnnotation.py | 0 {code => src}/ChiasmusAnnotation.py | 0 {code => src}/MGHPreprocessor.py | 0 {code => src}/TextObject.py | 0 {code => src}/TextPreprocessor.py | 0 {code => src}/stylotool.py | 0 {code => src}/test/test_text.json | 0 {code => src}/test/test_text_de.json | 0 {code => src}/test_chiasmus_annotation.py | 0 {code => src}/test_text_object.py | 0 {code => src}/train_chiasmus_model.py | 0 14 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 pyproject.toml rename {code => src}/AlliterationAnnotation.py (100%) rename {code => src}/ChiasmusAnnotation.py (100%) rename {code => src}/MGHPreprocessor.py (100%) rename {code => src}/TextObject.py (100%) rename {code => src}/TextPreprocessor.py (100%) rename {code => src}/stylotool.py (100%) rename {code => src}/test/test_text.json (100%) rename {code => src}/test/test_text_de.json (100%) rename {code => src}/test_chiasmus_annotation.py (100%) rename {code => src}/test_text_object.py (100%) rename {code => src}/train_chiasmus_model.py (100%) diff --git a/README.md b/README.md index e69de29..64a9bf6 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,6 @@ +# STYLOTOOL - an easy-to-use stylistic device detection tool for stylometry + +An easy-to-use package for detecting stylistic devices in text. This package is designed to be used in stylometry, the study of linguistic style. + +For those proficient in python, this package provides a collection of approaches to detect stylistic devices in text. For those less proficient in python, this package provides a simple interface to detect stylistic devices in text with simple commands and user-friendly configuration. +For an example on usage, see `example_chiasmus.sh` and the config file `example_config.json`. diff --git a/example_chiasmus.sh b/example_chiasmus.sh index 19107df..994afa4 100755 --- a/example_chiasmus.sh +++ b/example_chiasmus.sh @@ -1,5 +1,5 @@ #!/bin/bash mkdir -p example -cd code +cd src python3 stylotool.py --input ../datasets/tests/chiasmustest.txt --output ../example/chiasmus_results.json --config ../example_config.json diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..95bece7 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,17 @@ +[project] +name = "stylotool" +version = "0.0.1" +authors = [ + { name = "Felix Schneider", email = "felix.schneider@uni-jena.de"}, +] +description = "A tool for stylistic device detection" +readme = "README.md" +requires-python = ">=3.6" +classifiers = [ + "Programming Language :: Python :: 3", + "Operating System :: OS Independent", + ] + +[project.urls] +Homepage = "https://github.com/cvjena/stylotool" +Issues = "https://github.com/cvjena/stylotool/issues" diff --git a/code/AlliterationAnnotation.py b/src/AlliterationAnnotation.py similarity index 100% rename from code/AlliterationAnnotation.py rename to src/AlliterationAnnotation.py diff --git a/code/ChiasmusAnnotation.py b/src/ChiasmusAnnotation.py similarity index 100% rename from code/ChiasmusAnnotation.py rename to src/ChiasmusAnnotation.py diff --git a/code/MGHPreprocessor.py b/src/MGHPreprocessor.py similarity index 100% rename from code/MGHPreprocessor.py rename to src/MGHPreprocessor.py diff --git a/code/TextObject.py b/src/TextObject.py similarity index 100% rename from code/TextObject.py rename to src/TextObject.py diff --git a/code/TextPreprocessor.py b/src/TextPreprocessor.py similarity index 100% rename from code/TextPreprocessor.py rename to src/TextPreprocessor.py diff --git a/code/stylotool.py b/src/stylotool.py similarity index 100% rename from code/stylotool.py rename to src/stylotool.py diff --git a/code/test/test_text.json b/src/test/test_text.json similarity index 100% rename from code/test/test_text.json rename to src/test/test_text.json diff --git a/code/test/test_text_de.json b/src/test/test_text_de.json similarity index 100% rename from code/test/test_text_de.json rename to src/test/test_text_de.json diff --git a/code/test_chiasmus_annotation.py b/src/test_chiasmus_annotation.py similarity index 100% rename from code/test_chiasmus_annotation.py rename to src/test_chiasmus_annotation.py diff --git a/code/test_text_object.py b/src/test_text_object.py similarity index 100% rename from code/test_text_object.py rename to src/test_text_object.py diff --git a/code/train_chiasmus_model.py b/src/train_chiasmus_model.py similarity index 100% rename from code/train_chiasmus_model.py rename to src/train_chiasmus_model.py