# -*- coding: utf-8 -*-
from setuptools import setup

modules = \
['limco']
install_requires = \
['fire>=0.5.0,<0.6.0',
 'ginza>=5.1.2,<6.0.0',
 'ja-ginza>=5.1.2,<6.0.0',
 'jaconv>=0.3.4,<0.4.0',
 'numpy>=1.24.2,<2.0.0',
 'pandas>=1.5.3,<2.0.0']

entry_points = \
{'console_scripts': ['limco = limco:main']}

setup_kwargs = {
    'name': 'limco',
    'version': '2.0.0',
    'description': 'Linguistic Measure Collection',
    'long_description': "# limco: LInguistic Measure COllection\n\nA collection of the stylometric measures for authorship detection that are suggested to have relationships to the attitudes and psychological tendencies of authors.\nThis library can calculate 12 types of stylometrics, based on Japanese text metrics organised in [Asaishi (2017)](https://doi.org/10.20651/jslis.63.3_159).\n\nCurrently, only compatible with Japanese inputs.\n\nPlease cite [Manabe et al. (2021)](https://doi.org/10.2196/29500) (see the bottom references) if you use this library.\n\nThis collection needs more linguistic mesures to be complete, of course.\nIssues and Pull Requests are welcome!\n\nlimco は著者の態度や心理的特性と関連があるとされるスタイロメトリック言語指標のコレクションです。\n[浅石 (2017)](https://doi.org/10.20651/jslis.63.3_159) にまとめられている日本語の言語指標をベースにしています。\n\n現在、日本語のみに対応しています。\n\nこのライブラリを使用した場合は、[Manabe et al. (2021)](https://doi.org/10.2196/29500) (下記参考文献) を引用してください。\n\n本ライブラリは言語指標のコレクションとしてはまだまだ不完全です．Issue や PR を歓迎します！\n\n## Installation / インストール\n\nYou need Python 3.9 or later.\n\n```shell\npip install limco\n```\n\n## Usage / 使い方\n\nSpecify the path to the CSV or Excel file and the column name of the text to be analysed.\n\n```shell\nlimco path/to/file.csv text\n```\n\n### Optional Resources / オプションのリソース\n\nFurthermore, the following linguistic resources are can be used.\nSpecify the paths to the resources with the following options.\n\nさらに，以下の言語リソースを使用することができます。\n次のオプションでリソースへのパスを指定してください。\n\n- `--sw`: Japanese stopwords (1 行 1 単語＝原形の形式のテキストファイル)\n- `--awd`: [日本語抽象度辞書 AWD-J](https://sociocom.naist.jp/awd-j/) `-EX` データを使用してください (e.g. [`AWD-J_EX.txt`](http://sociocom.jp/~data/2019-AWD-J/data/AWD-J_EX.txt))\n- `--jiwc`: [日本語感情表現辞書 JIWC](https://sociocom.naist.jp/jiwc-dictionary/) `-A` データを使用してください (e.g. [`JIWC-A_2019.csv`](https://github.com/sociocom/JIWC-Dictionary/blob/master/ver_2019/JIWC-A_2019.csv))\n\n## Linguistic Measures / 言語指標\n\nThe following linguistic measures are implemented. / 次の言語指標が実装されています。\n\n- **Percentages of character types / 文字種の割合**:\n  The ratio of hiragana, katakana, and kanji (Chinese characters) to\n  the characters in text, respectively. / ひらがな、カタカナ、漢字（中国語の文字）のそれぞれの、総文字数に対する割合。\n\n- **Type Token Ratio (TTR)**:\n  The ratio of the distinct words to the total number of words in text.\n  We cover several variants of TTRs. / 異なり語数（単語の種類数）を、総単語数で割った値。いくつかの補正バリエーションを実装。\n\n- **Percentage of content words / 内容語の割合**:\n  The ratio of content words (i.e., nouns, verbs, adjectives, and\n  adverbs) to the total number of words in text. / 内容語（名詞、動詞、形容詞、副詞）のそれぞれの、総単語数に対する割合。\n\n- **Modifying words and Verb Ratio (MVR) / 相の類に対する用の類の割合**:\n  The ratio of verbs to adjectives, adverbs, and pre-noun adjectival for the\n  words in text. It has been used as one of the indicators of\n  author estimation. / 用の類（形容詞、副詞、連体詞）に対する動詞の割合。著者推定の指標として用いられている。\n\n- **Percentage of proper nouns / 固有名詞の割合**:\n  The ratio of proper nouns (named entities) to all words in text. / 固有名詞のそれぞれの、総単語数に対する割合。\n\n- **Word abstractness / 単語抽象度**:\n  The abstraction degrees of the words in text. We specifically\n  used the maximum value of the most abstract word, and the average of\n  the top five abstract words. The abstraction degrees were obtained\n  from the Japanese word-abstraction dictionary [AWD-J EX](http://sociocom.jp/~data/2019-AWD-J/). / 単語抽象度辞書 AWD-J EX から得られる単語抽象度。最も抽象的な単語の最大値、上位 5 語の平均値を使用。\n\n- **Emotion scores / 感情スコア**:\n  The ratios, to all the words in text, of the words that are\n  associated with each of the seven kinds of emotions: sadness,\n  anxiety, anger, disgust, trust, surprise, and joy. The seven\n  values are transformed to meet the property of probability (each\n  value spans between 0 and 1; the sum of all values is to be 1). The\n  degree of association with emotion was determined according to the\n  Japanese emotional-word dictionary JIWC. / 感情辞書 JIWC から得られる感情スコア。7 種類の感情（悲しみ、不安、怒り、嫌悪、信頼、驚き、喜び）に対するそれぞれの単語の割合。7 つの値は確率の性質を満たすように変換されている（各値は 0 から 1 の間にあり、合計は 1 になる）。\n\n- **The number of sentences / 総文数**:\n  The total number of sentences that make up text. / 文の総数。\n\n- **Length of sentences / 文の長さ**:\n  Descriptive statistics (mean, standard deviation, interquartile,\n  minimum, and maximum) for the number of characters in each sentence\n  that constitutes text. In particular, the average sentence\n  length has been suggested to be linked to the writer’s creative\n  attitude and personality. / 文の長さの統計量（平均、標準偏差、四分位範囲、最小値、最大値）。特に、平均文長は著者の創造的態度や性格と関連しているとされている。\n\n- **Percentage of conversational sentences / 会話文の割合**:\n  Percentage of the total number of conversational sentences contained\n  in text. / 会話文（「」『』で括られたテキスト）の総文数に対する割合。\n\n- **Depth of syntax tree / 係り受け構造の深さ**:\n  Descriptive statistics calculated for the depth of the dependency\n  tree for each sentence in text. / 係り受け構造の深さの統計量。\n\n- **The number of chunks per sentence / 文ごとの文節数**:\n  Descriptive statistics calculated for the average values of the\n  number of chunks for each sentence in text. / 文ごとの文節数の統計量。\n\n- **The tokens per chunk / 文節ごとの単語数**:\n  Descriptive statistics calculated for the average values of the\n  number of words per chunk in text. / 文節ごとの単語数の統計量。\n\n### Summary table\n\n| Stylometric                            | Sub-measures (value format)                                                                        |\n| :------------------------------------- | :------------------------------------------------------------------------------------------------- |\n| Percentages of character types         | Hiragana, katakana, and kanji (Chinese characters) (%)                                             |\n| Type Token Ration (TTR)                | Plain TTR, Guiraud's R, Herdan's C_H, Rubet's k, Maas's a^2, Tuldava's LN, Brunet's W, Dugast's U, |\n| Percentages of content words           |                                                                                                    |\n| Modifying words and Verb Ratio (MVR)   | (%)                                                                                                |\n| Percentage of proper nouns             | (%)                                                                                                |\n| Word abstractness                      | The maximum, and the average of the top five abstract words (real number)                          |\n| Emotion scores                         | sadness, anxiety, anger, disgust, trust, surprise, and joy (%)                                     |\n| The number of sentences                | (integer)                                                                                          |\n| Length of sentences                    | mean, standard deviation, interquartile, minimum, and maximum (real number)                        |\n| Percentage of conversational sentences | (%)                                                                                                |\n| Depth of syntax tree                   | mean, standard deviation, interquartile, minimum, and maximum (real number)                        |\n| The number of chunks per sentence      | mean, standard deviation, interquartile, minimum, and maximum (real number)                        |\n| The tokens per chunk                   | mean, standard deviation, interquartile, minimum, and maximum (real number)                        |\n\n---\n\n## References\n\n- [Asaishi, 2017]: 浅石卓真. 2017. テキストの特徴を計量する指標の概観. 日本図書館情報学会誌, 63(3), 159–169. https://doi.org/10.20651/jslis.63.3_159\n- [Manabe+, 2021]: Masae Manabe, Kongmeng Liew, Shuntaro Yada, Shoko Wakamiya, Eiji Aramaki. 2021. Estimation of Psychological Distress in Japanese Youth Through Narrative Writing: Text-Based Stylometric and Sentiment Analyses. JMIR Formative Research, 5(8):e29500. https://doi.org/10.2196/29500\n\n## Developer\n\n- [Shuntaro Yada](https://shuntaroy.com)\n",
    'author': 'Shuntaro Yada',
    'author_email': 'contact@shuntaroy.com',
    'maintainer': 'None',
    'maintainer_email': 'None',
    'url': 'https://github.com/sociocom/limco',
    'py_modules': modules,
    'install_requires': install_requires,
    'entry_points': entry_points,
    'python_requires': '>=3.9,<4.0',
}


setup(**setup_kwargs)
