{ "info": { "author": "Tatu Ylonen", "author_email": "ylo@clausal.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Natural Language :: Finnish", "Operating System :: OS Independent", "Operating System :: POSIX :: Linux", "Programming Language :: Python", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3 :: Only", "Topic :: Text Processing", "Topic :: Text Processing :: Linguistic" ], "description": "# Wiktfinnish\n\nThis is a Python module for inflecting Finnish words (verb inflection,\ncomparatives, cases, possessive suffixes, clitics) using\nWiktionary-compatible declensions and conjugations.\n\n## Overview\n\nThis Python module is intended for generating inflected forms of\nFinnish words in Wiktionary. It is most conveniently used with\ndictionaries extracted using the\n[wiktextract](https://github.com/tatuylonen/wiktextract). The\nintention is that this module can be used to generate the complete set\nof inflected forms for any Finnish word in Wiktionary - including\ncomparisons, possessive suffixes, clitics, and nominally inflected\nverb forms.\n\n## Getting started\n\n### Installing\n\nTo install ``wiktwikfinnish``, use ``pip3`` (or ``pip``, as\nappropriate), or clone the repository and install from the source:\n\n```\ngit clone https://github.com/tatuylonen/wiktfinnish.git\ncd wiktfinnish\npython3 setup.py install\n```\n\nThis will install the ``wiktfinnish`` package.\n\nNote that this software has currently only been tested with Python 3.\nBack-porting to Python 2.7 should not be difficult; it just hasn't\nbeen tested yet. Please report back if you test and make this work\nwith Python 2.\n\n### Running tests\n\nThis package includes tests written using the ``unittest`` framework.\nThey can be run using, for example, ``nose``, which can be installed\nusing ``pip3 install nose``.\n\nTo run the tests, just use the following command in the top-level directory:\n```\nnosetests\n```\n\n## Usage\n\n### Generating an inflected word form\n\nThe basic way to generate an inflected word form is to use the following\ncode snippet.\n\n```\nimport wiktfinnish\n\nresults = wiktfinnish.inflect(name, args, form)\n```\n\nThe ``inflect`` function returns a list of strings, which are the\nalternative forms generated for that word form. The preferred, or\nmost common form should be first in the list and rare/archaic examples\nlater.\n\nThe name and arguments specify the conjugation/declension for the word. That includes specifying the word to be inflected. See below for details.\n\nThe form is a 5-tuple ``(verbform, comparison, case, possessive,\nclitic)``, that specifies the inflected form to be generated. It is described in detail below.\n\n### Specifying the conjugation/declension\n\nIn the API, each word to be inflection must be specified by a\nconjugation (verbs) or declination (nominals) specification. The\nspecification is basically the arguments of the ``{{fi-decl-xyx}}`` or\n`{{fi-conj-xyz}}`` template from Wiktionary, encoded into a Python\ndictionary. In the API, this template will be called ``args``.\nAdditionally, the API requies the name of the template to be supplied\nas the ``name`` argument. These are readily available in the proper\nformat if the dictionary has been extracted using ``wiktextract`` (see\nbelow).\n\n### Specifying the desired word form\n\nThe desired word form is specified by a 5-tuple ``(verbform,\ncomparison, case, possessive, clitic)``, where any unused components\nmust be empty strings.\n\nGenerally, finite verb forms only have the ``verbform`` part specified\nand other parts empty. Nouns, pronouns, adjectives, and numerals\nalways have the ``verbform`` and ``comparison`` parts empty.\nAdjectives (and some verb forms) may also use ``comparison``. The\n``possessive`` specifies a possessive suffix, and they are mostly used\nwith nouns. The ``clitic`` is specifies any clitics to be attached at\nthe end of the word, and can be used with any part-of-speech.\n\n### Verb form names\n\nThe following values are allowed for ``verbform``, in addition to the\nempty string. The list of valid verb form names can be found in\n``wiktfinnish.VERB_FORMS``. (There may still be some changes coming\nin how case endings are handled for infinitives.)\n\n```\n pres-1sg\n pres-2sg\n pres-3sg\n pres-1pl\n pres-2pl\n pres-3pl\n pres-1sg-neg\n pres-2sg-neg\n pres-3sg-neg\n pres-1pl-neg\n pres-2pl-neg\n pres-3pl-neg\n pres-pass\n pres-pass-neg\n past-1sg\n past-2sg\n past-3sg\n past-1pl\n past-2pl\n past-3pl\n past-1sg-neg\n past-2sg-neg\n past-3sg-neg\n past-1pl-neg\n past-2pl-neg\n past-3pl-neg\n past-pass\n past-pass-neg\n cond-1sg\n cond-2sg\n cond-3sg\n cond-1pl\n cond-2pl\n cond-3pl\n cond-1sg-neg\n cond-2sg-neg\n cond-3sg-neg\n cond-1pl-neg\n cond-2pl-neg\n cond-3pl-neg\n cond-pass\n cond-pass-neg\n impr-2sg\n impr-3sg\n impr-1pl\n impr-2pl\n impr-3pl\n impr-2sg-neg\n impr-3sg-neg\n impr-1pl-neg\n impr-2pl-neg\n impr-3pl-neg\n impr-pass\n impr-pass-neg\n potn-1sg\n potn-2sg\n potn-3sg\n potn-1pl\n potn-2pl\n potn-3pl\n potn-1sg-neg\n potn-2sg-neg\n potn-3sg-neg\n potn-1pl-neg\n potn-2pl-neg\n potn-3pl-neg\n potn-pass\n potn-pass-neg\n pres-part\n pres-pass-part\n past-part\n past-pass-part\n agnt-part\n nega-part\n inf1\n inf1-long\n inf2-ine\n inf2-pass-ine\n inf2-ins\n inf3-ine\n inf3-ela\n inf3-ill\n inf3-ade\n inf3-abe\n inf3-ins\n inf3-pass-ins\n inf4-nom\n inf4-par\n inf5\n```\n\n### Comparison names\n\nAdjectives, participles, and some other adverbs accept comparisons.\nThe normal positive form is marked by the empty string. ``comp``\nindicates comparative, and ``sup`` indicates superlative form. The\nlist of valid comparison names (including the empty string) can be\nfound in ``wiktfinnish.COMP_FORMS``.\n\n### Case names\n\nNouns, pronouns, adjectives, numerals, and various verb forms\n(especially participles) accept case endings. The following names are\nused to specify both case ending and number. The ``acc-sg`` and\n``acc-pl`` values are only valid for certain pronouns. For all other\nparts of speech, one of ``nom-sg``, ``nom-pl``, ``gen-sg``, or\n``gen-pl`` should be used instead. The list of valid case+number\nvalues can be found in ``wiktfinnish.CASE_FORMS``.\n\n```\n nom-sg - nominative (singular)\n acc-sg - accusative\n gen-sg - genitive\n ptv-sg - partitive\n ine-sg - inessive\n ela-sg - elative\n ill-sg - illative\n ade-sg - adessive\n abl-sg - ablative\n all-sg - allative\n ess-sg - essive\n tra-sg - translative\n ins-sg - instructive\n abe-sg - abessive\n cmt-sg - comitative\n nom-pl - nominative (plural)\n acc-pl - etc.\n gen-pl\n ptv-pl\n ine-pl\n ela-pl\n ill-pl\n ade-pl\n abl-pl\n all-pl\n ess-pl\n tra-pl\n ins-pl\n abe-pl\n cmt-pl\n```\n\n### Possessive suffixes\n\nThe following values are used for possessive suffixes. The empty\nstring indicates that no possessive suffix is to be attached. Note\nthat for the third person, the ``3x`` value is used for both singular\nand plural, as the forms are always the same. The list of valid\npossessive forms (including the empty string) can be found in\n``wiktfinnish.POSSESSIVE_FORMS``.\n\n```\n 1s - first person singular\n 2s\t - second person singular\n 3x\t - third person (singular or plural)\n 1p\t - first person plural\n 2p\t - second person plural\n```\n\n### Clitics\n\nThere is a fixed set of clitics that can be attached. In practice,\nhowever, more clitics may be used in spoken language and there are\nvarious other alternations. The following values can be used for\nclitics, in addition to the empty string, which signifies no clitic.\nThe list of valid clitic values (including the empty string) can be\nfound in ``wiktfinnish.CLITIC_FORMS``.\n\n```\n kO\n kin\n kAAn\n pA\n s\n kA\n hAn\n kOhAn\n pAhAn\n pAs\n kOs\n kinkO\n kAAnkO\n kinkOhAn\n```\n\n### Iterating over all possible word forms\n\nFunctions are also provided for iterating over all valid 5-tuples\nindicating word forms. These are useful if one wants to generate all\npossible forms of a word. The following code snippet iterates over\nall adjective forms:\n\n```\nimport wiktfinnish\n\nfor verbform, comp, case, poss, clitic in wiktfinnish.all_forms_iter(\"adj\"):\n print(verbform, comp, case, poss, clitic)\n```\n\nThe ``all_forms_iter`` function takes as a mandatory argument a\npart-of-speech (as returned by the ``wiktextract`` module, see below),\nincluding \"noun\", \"adj\", \"verb\", \"num\", \"pron\", \"adv\", etc. It can\nalso take the following optional keyword arguments (more will likely\nbe added later) to restrict the forms that are enumerated:\n\n* ``comparable``: if True (default), include comparison forms (for adjectives, adverbs)\n* ``transitive``: if True (default), include agent participle (forms that are only valid for verbs with an agent)\n* ``no_clitics``: if True, don't include forms with clitics (default is to include them)\n\n### Fast way of obtaining list of possible forms for a part-of-speech\n\nThere is also a cached version of the iterator that returns a sequence\ncontaining all valid forms for the given part-of-speech and keyword\narguments. It takes the same arguments (including keyword arguments)\nas the iterator, but instead of returning an iterator returns a list.\nThis function is also much faster and caches its results for maximum\nperformance.\n\n```\nimport wiktfinnish\n\nlst = wiktfinnish.all_forms_list(\"verb\")\n```\n\n#### Standard vs. colloquial Finnish\n\nCurrently this generates forms according to standard written Finnish. The\nintention is to generate spoken language / colloquial forms for\nstandard Finnish in the future, as well as possibly some dialectical\nforms. However, that is not yet implemented.\n\n## Contributing\n\nThe official repository of this project is on\n[github](https://github.com/tatuylonen/wiktfinnish).\n\nPlease email to ylo at clausal.com if you wish to contribute or have\npatches or suggestions.\n\n## License\n\nCopyright (c) 2018 [Tatu Ylonen](https://ylonen.org). This package is\nfree for both commercial and non-commercial use. It is licensed under\nthe MIT license. See the file\n[LICENSE](https://github.com/tatuylonen/wiktfinnish/blob/master/LICENSE)\nfor details.\n\nCredit and linking to the project's website and/or citing any future\npapers on the project would be highly appreciated.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "https://github.com/tatuylonen/wiktfinnish", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://clausal.com", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "wiktfinnish", "package_url": "https://pypi.org/project/wiktfinnish/", "platform": "", "project_url": "https://pypi.org/project/wiktfinnish/", "project_urls": { "Download": "https://github.com/tatuylonen/wiktfinnish", "Homepage": "https://clausal.com" }, "release_url": "https://pypi.org/project/wiktfinnish/0.1.4/", "requires_dist": null, "requires_python": "", "summary": "Finnish morphology (including verb forms, comparatives, cases, possessives, clitics)", "version": "0.1.4" }, "last_serial": 4442667, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "2a22edaf05e5075ae8f26142805c0e5d", "sha256": "1839a31cdf5d8073e750d4dd300036a85b33a219d147f4b7abb3bcf9b9a120a7" }, "downloads": -1, "filename": "wiktfinnish-0.1.1-py3.6.egg", "has_sig": false, "md5_digest": "2a22edaf05e5075ae8f26142805c0e5d", "packagetype": "bdist_egg", "python_version": "3.6", "requires_python": null, "size": 57493, "upload_time": "2018-11-01T23:11:46", "url": "https://files.pythonhosted.org/packages/69/a4/ccaee69b74be327047151de68cc71393b9b1772787aab74eb04e8bc683c6/wiktfinnish-0.1.1-py3.6.egg" }, { "comment_text": "", "digests": { "md5": "3dd285ce97678a942f84e43f64d35ea6", "sha256": "454330a8de312c4a39293481d7b133b0baa76769c2980387bb29cc0ddbf1896c" }, "downloads": -1, "filename": "wiktfinnish-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "3dd285ce97678a942f84e43f64d35ea6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 31414, "upload_time": "2018-10-30T21:33:01", "url": "https://files.pythonhosted.org/packages/12/f3/338f05352bb114feeb835bd2329eb71b8c42f60cde7088fcbcfcfa93e062/wiktfinnish-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "204c101d613305127970105c4b8b6673", "sha256": "b6b591ed3af158512a05c568a85d46d0d862b50c9f326a72e55e0c53216e21d6" }, "downloads": -1, "filename": "wiktfinnish-0.1.1.tar.gz", "has_sig": false, "md5_digest": "204c101d613305127970105c4b8b6673", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30251, "upload_time": "2018-10-30T21:33:03", "url": "https://files.pythonhosted.org/packages/19/15/800ee52eb12a80b3d5200635857897156a446f5e8666128cf2007661ec54/wiktfinnish-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "c46c3f7f96407c12014ef0e2ac803d7a", "sha256": "24a5c5156b1ee3a87cdf88a06d9bd257fd7ee1a8595913628a7c53699489b2f0" }, "downloads": -1, "filename": "wiktfinnish-0.1.2-py3.6.egg", "has_sig": false, "md5_digest": "c46c3f7f96407c12014ef0e2ac803d7a", "packagetype": "bdist_egg", "python_version": "3.6", "requires_python": null, "size": 57631, "upload_time": "2018-11-01T23:11:47", "url": "https://files.pythonhosted.org/packages/b7/f9/724b52fdb699ac23daf5d8e0f24ada31844e100b108b3fe0dc72c0dddc38/wiktfinnish-0.1.2-py3.6.egg" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "690067babb2ccceb9c50c8b16f9a5110", "sha256": "28f7cb54a7fffdc867bc2311594110fe19c6d99c31c1f53674e40b87d8a59dbd" }, "downloads": -1, "filename": "wiktfinnish-0.1.3-py3.6.egg", "has_sig": false, "md5_digest": "690067babb2ccceb9c50c8b16f9a5110", "packagetype": "bdist_egg", "python_version": "3.6", "requires_python": null, "size": 57711, "upload_time": "2018-11-01T23:11:49", "url": "https://files.pythonhosted.org/packages/55/77/65c7cf9343407a6213209b5ca01466d4b77493a43f7afc4f6433fcbfc8cc/wiktfinnish-0.1.3-py3.6.egg" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "97262a0270a2732194ad58b016bca7a1", "sha256": "10eaa1356658a8258628a63b8f87f079f4bf38faf14186c76c489b5baa98383a" }, "downloads": -1, "filename": "wiktfinnish-0.1.4-py3.6.egg", "has_sig": false, "md5_digest": "97262a0270a2732194ad58b016bca7a1", "packagetype": "bdist_egg", "python_version": "3.6", "requires_python": null, "size": 57731, "upload_time": "2018-11-01T23:11:51", "url": "https://files.pythonhosted.org/packages/58/d4/22ee0da28ffd2db37f924e2ff278a7ee58e2dc88d97740d4fde7bf9744cb/wiktfinnish-0.1.4-py3.6.egg" }, { "comment_text": "", "digests": { "md5": "f158aac295ee6f44be949333379dedb9", "sha256": "a82f2f476248ce3f5a1e2ddb1cf42e5dada0fdada127598b923439be1d9f91a4" }, "downloads": -1, "filename": "wiktfinnish-0.1.4-py3-none-any.whl", "has_sig": false, "md5_digest": "f158aac295ee6f44be949333379dedb9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 31616, "upload_time": "2018-11-01T23:11:44", "url": "https://files.pythonhosted.org/packages/21/fd/8ec4bf6e7e781a560225029a196e2b315424d33453e99e3fead3464d0fa7/wiktfinnish-0.1.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "41b6605a3e56d5bc15a16fff85d4ce74", "sha256": "b74d6acfafdb78d0f5963664c3a6b3abf6a57ee185c560933acd5c0728e94c68" }, "downloads": -1, "filename": "wiktfinnish-0.1.4.tar.gz", "has_sig": false, "md5_digest": "41b6605a3e56d5bc15a16fff85d4ce74", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30366, "upload_time": "2018-11-01T23:11:53", "url": "https://files.pythonhosted.org/packages/7a/10/bef5242efbe78434ad642f7006d17dc79db528165dcbb90098c1d192520e/wiktfinnish-0.1.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "97262a0270a2732194ad58b016bca7a1", "sha256": "10eaa1356658a8258628a63b8f87f079f4bf38faf14186c76c489b5baa98383a" }, "downloads": -1, "filename": "wiktfinnish-0.1.4-py3.6.egg", "has_sig": false, "md5_digest": "97262a0270a2732194ad58b016bca7a1", "packagetype": "bdist_egg", "python_version": "3.6", "requires_python": null, "size": 57731, "upload_time": "2018-11-01T23:11:51", "url": "https://files.pythonhosted.org/packages/58/d4/22ee0da28ffd2db37f924e2ff278a7ee58e2dc88d97740d4fde7bf9744cb/wiktfinnish-0.1.4-py3.6.egg" }, { "comment_text": "", "digests": { "md5": "f158aac295ee6f44be949333379dedb9", "sha256": "a82f2f476248ce3f5a1e2ddb1cf42e5dada0fdada127598b923439be1d9f91a4" }, "downloads": -1, "filename": "wiktfinnish-0.1.4-py3-none-any.whl", "has_sig": false, "md5_digest": "f158aac295ee6f44be949333379dedb9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 31616, "upload_time": "2018-11-01T23:11:44", "url": "https://files.pythonhosted.org/packages/21/fd/8ec4bf6e7e781a560225029a196e2b315424d33453e99e3fead3464d0fa7/wiktfinnish-0.1.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "41b6605a3e56d5bc15a16fff85d4ce74", "sha256": "b74d6acfafdb78d0f5963664c3a6b3abf6a57ee185c560933acd5c0728e94c68" }, "downloads": -1, "filename": "wiktfinnish-0.1.4.tar.gz", "has_sig": false, "md5_digest": "41b6605a3e56d5bc15a16fff85d4ce74", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30366, "upload_time": "2018-11-01T23:11:53", "url": "https://files.pythonhosted.org/packages/7a/10/bef5242efbe78434ad642f7006d17dc79db528165dcbb90098c1d192520e/wiktfinnish-0.1.4.tar.gz" } ] }