Skip to content

Commit

Permalink
Merge pull request #7 from neocl/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
letuananh committed Apr 30, 2021
2 parents c02f9e3 + ea25756 commit b070185
Show file tree
Hide file tree
Showing 13 changed files with 445 additions and 16 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Main functions are:

## Installation

Speach is availble on [PyPI](https://pypi.org/project/speach/).
`speach` is available on [PyPI](https://pypi.org/project/speach/).

```bash
pip install speach
Expand Down
1 change: 1 addition & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ Contents
:maxdepth: 2

api_elan
api_media
api_ttl
api_vtt
8 changes: 8 additions & 0 deletions docs/api_media.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.. _page_vtt:

Media module
============


.. automodule:: speach.media
:members:
89 changes: 89 additions & 0 deletions docs/conduct.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
.. _conduct:

Contributor Covenant Code of Conduct
====================================

Our Pledge
----------

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to make participation in our project
and our community a harassment-free experience for everyone, regardless
of age, body size, disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic
status, nationality, personal appearance, race, religion, or sexual
identity and orientation.

Our Standards
-------------

Examples of behavior that contributes to creating a positive environment
include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery and unwelcome sexual
attention or advances
- Trolling, insulting/derogatory comments, and personal or political
attacks
- Public or private harassment
- Publishing others’ private information, such as a physical or
electronic address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

Our Responsibilities
--------------------

Project maintainers are responsible for clarifying the standards of
acceptable behavior and are expected to take appropriate and fair
corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit,
or reject comments, commits, code, wiki edits, issues, and other
contributions that are not aligned to this Code of Conduct, or to ban
temporarily or permanently any contributor for other behaviors that they
deem inappropriate, threatening, offensive, or harmful.

Scope
-----

This Code of Conduct applies within all project spaces, and it also
applies when an individual is representing the project or its community
in public spaces. Examples of representing a project or community
include using an official project e-mail address, posting via an
official social media account, or acting as an appointed representative
at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

Enforcement
-----------

Instances of abusive, harassing, or otherwise unacceptable behavior may
be reported by contacting the project team at <neocl@dakside.org>.
All complaints will be reviewed and investigated and will result in a
response that is deemed necessary and appropriate to the circumstances.
The project team is obligated to maintain confidentiality with regard to
the reporter of an incident. Further details of specific enforcement
policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in
good faith may face temporary or permanent repercussions as determined
by other members of the project’s leadership.

Attribution
-----------

This Code of Conduct is adapted from the `Contributor
Covenant <https://www.contributor-covenant.org>`__, version 1.4,
available at
https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
88 changes: 88 additions & 0 deletions docs/contributing.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
.. _contributing:

Contributing
============

There are many ways to contribute to ``speach``.
Currently development team are focusing on:

- Improving :ref:`documentation <contrib_docs>`
- Improving ELAN support
- Fixing bugs :ref:`existing bugs <contrib_bugfix>`

If you have some suggestions or bug reports, please share on `speach issues tracker <https://github.com/neocl/speach/issues>`_.

Code of conduct
---------------

Please read our :ref:`contributor code of conduct <conduct>` for more information.

.. _contrib_bugfix:

Fixing bugs
-----------

If you found a bug please report at https://github.com/neocl/speach/issues

When it is possible, please also share how to reproduce the bugs to help with the bug finding process.

Pull requests are welcome.

.. _contrib_docs:

Updating Documentation
----------------------

1. Fork `speach <https://github.com/neocl/speach>`_ repository to your own Github account.

#. Clone `speach` repository to your local machine.

.. code:: bash
git clone https://github.com/<your-account-name>/speach
#. Create a virtual environment (optional, but highly recommended)

.. code:: bash
# if you use virtualenvwrapper
mkvirtualenv speach
workon speach
# if you use Python venv
python3 -m venv .env
. .env/bin/activate
python3 -m pip install --upgrade pip wheel Sphinx
#. Build the docs

.. code:: bash
cd speach/docs
# compile the docs
make dirhtml
# serve the docs using Python3 built-in development server
# Note: this requires Python >= 3.7 to support --directory
python3 -m http.server 7000 --directory _build/dirhtml
# if you use earlier Python 3, you may use
cd _build/dirhtml
python3 -m http.server 7000
#. Now the docs should be ready to view at http://localhost:7000 . You can visit that URL on your browser to view the docs.

#. More information:

- Sphinx tutorial: https://sphinx-tutorial.readthedocs.io/start/
- Using `virtualenv`: https://virtualenvwrapper.readthedocs.io/en/latest/install.html
- Using `venv`: https://docs.python.org/3/library/venv.html

.. _contrib_dev:

Development
-----------

Development contributions are welcome.
Setting up development environment for speach should be similar to :ref:`contrib_docs`.

Please contact the development team if you need more information: https://github.com/neocl/speach/issues
30 changes: 25 additions & 5 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,22 @@
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to speach's documentation!
Speach - Documenting Natural languages
======================================

Speach (formerly `texttaglib <https://github.com/letuananh/texttaglib>`_) is a Python 3 library for managing, annotating, and converting natural language corpuses using popular formats (CoNLL, ELAN, Praat, CSV, JSON, SQLite, VTT, Audacity, TTL, TIG, ISF, etc.)
Welcome to speach's documentation!
Speach, formerly `texttaglib <https://github.com/letuananh/texttaglib>`_, is a Python 3 library for managing, annotating, and converting natural language corpuses using popular formats (CoNLL, ELAN, Praat, CSV, JSON, SQLite, VTT, Audacity, TTL, TIG, ISF, etc.)

Main functions are:
Main functions:

- Text corpus management library
- Text corpus management
- Manipuling `ELAN <https://archive.mpi.nl/tla/elan/download>`_ transcription files directly in ELAN Annotation Format (eaf)
- TTLIG - A human-friendly intelinear gloss format for linguistic documentation
- TIG - A human-friendly intelinear gloss format for linguistic documentation
- Multiple storage formats (text files, JSON files, SQLite databases)

:ref:`Contributors <contributors>` are welcome!.
If you want to help developing ``speach``, please visit :ref:`contributing` page.

Installation
------------

Expand Down Expand Up @@ -57,6 +61,9 @@ More information:
tutorials
recipes
api
contributing
conduct
updates

Useful Links
------------
Expand All @@ -65,6 +72,19 @@ Useful Links
- Speach on PyPI: https://pypi.org/project/speach/
- Soure code: https://github.com/neocl/speach/

Release Notes
-------------

Release notes is available :ref:`here <updates>`.

.. _contributors:

Contributors
------------

- `Le Tuan Anh <https://github.com/letuananh>`__ (Maintainer)
- `Victoria Chua <https://github.com/vicchuayh>`__

Indices and tables
==================

Expand Down
21 changes: 21 additions & 0 deletions docs/media.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Media processing
================

Media module can be used to process audio and video files (converting, merging, cutting, et cetera).
``speach.media`` use ffmpeg underneath.

Installing ffmpeg
-----------------

.. note::
To be updated

Sample code
-----------

.. code:: python
from speach import media
print(media.version())
print(media.locate_ffmpeg())
media.convert("infile.mp3", "outfile.wav")
9 changes: 9 additions & 0 deletions docs/tutorials.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,12 @@ speach is available on PyPI and can be installed using `pip`.
.. code-block:: bash
pip install --user speach
Module tutorials
----------------

.. toctree::
:maxdepth: 2

elan
media
14 changes: 14 additions & 0 deletions docs/updates.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.. _updates:

Updates
=======

2021-04-30
----------

- Package :ref:`Victoria Chua <contributors>`'s media processing code into ``speach.media`` module.

2021-04-28
----------

- Initial release on PyPI
17 changes: 9 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,11 @@ def read(*filenames, **kwargs):
setup(
name='speach',
version=pkg_info['__version__'],
url=pkg_info['__url__'],
project_urls={
"Bug Tracker": "https://github.com/neocl/speach/issues",
"Source Code": "https://github.com/neocl/speach/"
},
keywords="nlp",
license=pkg_info['__license__'],
author=pkg_info['__author__'],
tests_require=requirements + ['coverage'],
install_requires=requirements,
python_requires=">=3.6",
license=pkg_info['__license__'],
author=pkg_info['__author__'],
author_email=pkg_info['__email__'],
description=pkg_info['__description__'],
long_description=long_description,
Expand All @@ -57,6 +52,12 @@ def read(*filenames, **kwargs):
'speach.data'],
package_data={'speach': ['data/*.sql', 'data/*.gz']},
include_package_data=True,
url=pkg_info['__url__'],
project_urls={
"Bug Tracker": "https://github.com/neocl/speach/issues",
"Source Code": "https://github.com/neocl/speach/"
},
keywords=["nlp", "annotation", "text", "corpus", "linguistics", "ELAN", "transcription"],
platforms='any',
test_suite='test',
# Reference: https://pypi.python.org/pypi?%3Aaction=list_classifiers
Expand Down
4 changes: 2 additions & 2 deletions speach/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
__issue__ = "https://github.com/neocl/speach/issues/"
__maintainer__ = "Le Tuan Anh"
__version_major__ = "0.1" # follow PEP-0440
__version__ = "{}a5".format(__version_major__)
__version_long__ = "{} - Alpha 5".format(__version_major__)
__version__ = "{}a6".format(__version_major__)
__version_long__ = "{} - Alpha 6".format(__version_major__)
__status__ = "Prototype"

0 comments on commit b070185

Please sign in to comment.