Skip to content

Commit

Permalink
python3 fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Hämäläinen, Mika K committed Oct 12, 2019
1 parent b1d1c34 commit 8399ef4
Show file tree
Hide file tree
Showing 21 changed files with 79 additions and 9 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions backup_of_build_scripts/setup.py → setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
# Versions should comply with PEP440. For a discussion on single-sourcing
# the version across setup.py and the project code, see
# https://packaging.python.org/en/latest/single_source_version.html
version='1.1.0',
version='1.1.1',

description='An NLG tool for Finnish',
long_description=long_description,

# The project's main homepage.
url='https://mikakalevi.com/nlp/syntax-maker/',
url='https://github.com/mikahama/syntaxmaker/',

# Author details
author='Mika Hämäläinen, Dept. of Modern Languages, University of Helsinki',
Expand Down
45 changes: 45 additions & 0 deletions syntaxmaker.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
Metadata-Version: 1.1
Name: syntaxmaker
Version: 1.1.1
Summary: An NLG tool for Finnish
Home-page: https://github.com/mikahama/syntaxmaker/
Author: Mika Hämäläinen, Dept. of Modern Languages, University of Helsinki
Author-email: [email protected]
License: Apache License, Version 2.0
Description: Syntax Maker
=============
The tool NLG tool for Finnish by `Mika Hämäläinen <https://mikakalevi.com>`_


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. <https://github.com/mikahama/syntaxmaker/wiki/Creating-a-sentence,-the-basics>`_

**Update:** Python 2 and Python 3 are both now supported!

============
Installation
============

**NOTE 1:** This tool requires Omorfi, you can download the correct binary version from http://mikakalevi.com/omorfi

**NOTE 2:** If you have any issues with installing HFST, see `an HSFT tutorial
<https://mikalikes.men/using-hfst-on-python/>`_.

===========================
How to use
===========================

Start of by following this tutorial: https://github.com/mikahama/syntaxmaker/wiki/Creating-a-sentence,-the-basics . Or you can go ahead and `take a look at the wiki <https://github.com/mikahama/syntaxmaker/wiki>`_
or my `blog post about Syntax maker <https://mikalikes.men/create-finnish-sentences-computationally-in-python-nlg/>`_

Keywords: NLG Finnish
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Topic :: Text Processing
Classifier: Natural Language :: Finnish
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
22 changes: 22 additions & 0 deletions syntaxmaker.egg-info/SOURCES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
DESCRIPTION.rst
MANIFEST.in
README.md
setup.cfg
setup.py
syntaxmaker/__init__.py
syntaxmaker/adposition_tool.py
syntaxmaker/grammar.json
syntaxmaker/head.py
syntaxmaker/inflector.py
syntaxmaker/phrase.py
syntaxmaker/pronoun_tool.py
syntaxmaker/syntax_maker.py
syntaxmaker/verb_valence.py
syntaxmaker/verb_valences_new.json
syntaxmaker.egg-info/PKG-INFO
syntaxmaker.egg-info/SOURCES.txt
syntaxmaker.egg-info/dependency_links.txt
syntaxmaker.egg-info/requires.txt
syntaxmaker.egg-info/top_level.txt
syntaxmaker/data/postpositions.csv
syntaxmaker/data/prepositions.csv
1 change: 1 addition & 0 deletions syntaxmaker.egg-info/dependency_links.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions syntaxmaker.egg-info/requires.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hfst
1 change: 1 addition & 0 deletions syntaxmaker.egg-info/top_level.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
syntaxmaker
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion head.py → syntaxmaker/head.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#encoding: utf-8
__author__ = 'Mika Hämäläinen'
import inflector
from . import inflector

class Head:
def __init__(self, head, pos):
Expand Down
2 changes: 1 addition & 1 deletion inflector.py → syntaxmaker/inflector.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
__author__ = 'Mika Hämäläinen'
import hfst
import os
import pronoun_tool
from . import pronoun_tool
import sys

if (sys.version_info > (3, 0)):
Expand Down
2 changes: 1 addition & 1 deletion phrase.py → syntaxmaker/phrase.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#encoding: utf-8
__author__ = 'Mika Hämäläinen'
from head import Head
from .head import Head
import copy
import re, sys

Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions syntax_maker.py → syntaxmaker/syntax_maker.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# -*- coding: utf-8 -*-
__author__ = 'Mika Hämäläinen'
import verb_valence
from phrase import Phrase
from . import verb_valence
from .phrase import Phrase
import json
import random
import pronoun_tool
import adposition_tool
from . import pronoun_tool
from . import adposition_tool
import os

auxiliary_verbs = {"voida" : "A",
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 8399ef4

Please sign in to comment.