Syntax maker
The tool NLG tool for Finnish by Mika Hämäläinen
Syntax maker is the natural language generation tool for generating syntactically correct sentences in Finnish automatically. The tool is especially useful in the case of Finnish which has such a high diversity in its morphosyntax. All you need to know are the lemmas and their parts-of-speech and syntax maker will take care of the rest.
For instance, just throw in words rantaleijona, uneksia, korkea and aalto and you will get rantaleijonat uneksivat korkeista aalloista. So you will get the morphology right automatically! Don't believe me? Just take a look at this tutorial to find out how.
Installing
Run
pip install syntaxmaker
python -m uralicNLP.download -l fin
Usage
An example for generating a sentence in Finnish:
from syntaxmaker.syntax_maker import *
vp = create_verb_pharse("antaa")
subject = create_phrase("NP", "hevonen", {"NUM": "PL"})
dobject = create_phrase("NP", "lahja", {"NUM": "PL"})
dobject.components["attribute"] = create_phrase("AP", "mahtava")
dobject.components["attribute"].components["attribute"] = create_phrase("AdvP", "erittäin")
indobject = create_phrase("NP", "lehmä")
vp.components["subject"] = subject
vp.components["dir_object"] = dobject
vp.components["indir_object"] = indobject
>> hevoset antavat erittäin mahtavia lahjoja lehmälle
Go to Creating a sentence, the basics for a quick start guide.
A good source of example code with the expected output can be found in the Travis test file.
Don't forget to read the Wiki for more instructions.
Cite
If you use Syntax Maker in any academic publication, please cite it as follows:
Hämäläinen, Mika and Rueter, Jack 2018. Development of an Open Source Natural Language Generation Tool for Finnish. In Proceedings of the Fourth International Workshop on Computational Linguistics of Uralic Languages, 51–58.
More information?
Just go ahead and take a look at the wiki or my blog post about Syntax maker.
Metadata
Release files for syntaxmaker 2.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| syntaxmaker-2.0.1.tar.gz | 1.8 MB | Without provenance | Details for syntaxmaker-2.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| syntaxmaker-2.0.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for syntaxmaker-2.0.1-py2.py3-none-any.whl |
Total release size: 3.7 MB
Release files / syntaxmaker-2.0.1.tar.gz
| Download URL | syntaxmaker-2.0.1.tar.gz |
|---|---|
| Size | 1.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0c719046cd6df9906c744c8215b526ff181bfba430cc01f8fffaafa40cbfdfb2
|
|
BLAKE2b-256 checksum How to use checksums |
3af94f94bfc59528a633df79c3896051c7044f8ac8b9e2bc30a572b65bcb0e35
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.6.8
|
Release files / syntaxmaker-2.0.1-py2.py3-none-any.whl
| Download URL | syntaxmaker-2.0.1-py2.py3-none-any.whl |
|---|---|
| Size | 1.9 MB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
39f432b21ade184bd242af0f6bef062e516995cb5477bda0c4449f12c143ea06
|
|
BLAKE2b-256 checksum How to use checksums |
e764c9a2925f42668ea4e1c1ed8c7906ec044758c85dc0fe2d1605eb22e29f9a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.6.8
|
Security for syntaxmaker 2.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.