Skip to content

Commit

Permalink
Docummentation
Browse files Browse the repository at this point in the history
First structure of the documentation
  • Loading branch information
jpereiran committed Apr 15, 2018
1 parent 01b954c commit f2efecd
Show file tree
Hide file tree
Showing 12 changed files with 480 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -41,7 +41,7 @@ pip install chana
- Project website: http://chana.inf.pucp.edu.pe
- Official source code repo: https://github.com/iapucp/chana-library
- Download releases: https://pypi.python.org/pypi/...
- HTML documentation (stable release): http://chana.inf.pucp.edu.pe
- HTML documentation (stable release): http://chana.readthedocs.io/en/latest/

### Communication

Expand Down
20 changes: 20 additions & 0 deletions docs/Makefile
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXPROJ = chana
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
22 changes: 22 additions & 0 deletions docs/api.rst
@@ -0,0 +1,22 @@
.. _api:

API
===

.. module:: chana

This part of the documentation covers all the functions of Chana.


Application Modules
------------------

.. module:: ner


Useful Functions and Classes
----------------------------




9 changes: 9 additions & 0 deletions docs/changelog.rst
@@ -0,0 +1,9 @@
.. currentmodule:: chana

Flask Changelog
===============

Version 0.9
-----------

First public release.
161 changes: 161 additions & 0 deletions docs/conf.py
@@ -0,0 +1,161 @@
# -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/stable/config

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys
sys.path.insert(0, os.path.abspath('.'))


# -- Project information -----------------------------------------------------

project = 'chana'
copyright = '2018, Jose Pereira'
author = 'Jose Pereira'

# The short X.Y version
version = '0.9'
# The full version, including alpha/beta/rc tags
release = '0.9'


# -- General configuration ---------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.viewcode',
'sphinx.ext.githubpages',
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'

# The master toctree document.
master_doc = 'index'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path .
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
# html_theme_options = {}

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
#
# The default sidebars (for documents that don't match any pattern) are
# defined by theme itself. Builtin themes are using these templates by
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
# 'searchbox.html']``.
#
# html_sidebars = {}


# -- Options for HTMLHelp output ---------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'chanadoc'


# -- Options for LaTeX output ------------------------------------------------

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',

# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'chana.tex', 'chana Documentation',
'Jose Pereira', 'manual'),
]


# -- Options for manual page output ------------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'chana', 'chana Documentation',
[author], 1)
]


# -- Options for Texinfo output ----------------------------------------------

# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'chana', 'chana Documentation',
author, 'chana', 'One line description of project.',
'Miscellaneous'),
]


# -- Extension configuration -------------------------------------------------
50 changes: 50 additions & 0 deletions docs/index.rst
@@ -0,0 +1,50 @@
.. chana documentation master file, created by
sphinx-quickstart on Sat Apr 14 15:54:45 2018.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Chana: An NLP toolkit for the Shipibo-Konibo language of Peru.
=================================

Welcome to Chana's documentation. Get started with :ref:`installation`
and then get an overview with the :ref:`quickstart`.
The rest of the docs desribe each component of
Chana in detail, with a full reference in the :ref:`api` section.


User's Guide
------------

This part of the documentation focuses on a quick set-up and instructions
for using the basic NLP tools of Chana.

.. toctree::
:maxdepth: 2

installation
quickstart


API Reference
-------------

Information about the functions, classes or
methods of Chana.

.. toctree::
:maxdepth: 2

api



Additional Notes
----------------

Legal information and changelog.

.. toctree::
:maxdepth: 2

changelog
license
36 changes: 36 additions & 0 deletions docs/installation.rst
@@ -0,0 +1,36 @@
.. _installation:

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

Python Version
--------------

We recommend using the version of Python 3. Chana supports Python 3.4
and newer.

Dependencies
------------

To make chana work it is needed to have the following packages.

* `NumPy`_ the fundamental package for scientific computing with Python.
* `Scikit-learn`_ a package for machine learning in Python.
* `Python-crfsuite`_ a python binding to CRFsuite.

.. _NumPy: http://www.numpy.org/
.. _Scikit-learn: http://scikit-learn.org/
.. _Python-crfsuite: https://python-crfsuite.readthedocs.io/en/latest/



Install Chana
-------------

If you already have a working installation of numpy, scipy, and python-crfsuite
the easiest way to install chana is using ``pip``

::

pip install chana

45 changes: 45 additions & 0 deletions docs/license.rst
@@ -0,0 +1,45 @@
License
=======

Chana is licensed under a three clause MIT License. It basically means:
A permissive license that lets people do anything they want with the code
as long as they provide attribution back to the owner and don’t hold the owner liable.
The full license text can be found below (:ref:`chana-license`).

.. _authors:

Authors
-------

Chana is written and maintained by Jose Pereira and various contributors:

Development Lead
^^^^^^^^^^^^^^^^
Jose Pereira <jpereira@pucp.edu.pe>

Contributors
^^^^^^^^^^^^^^^^
- Jose Pereira (Lemmatizer)
- Rodolfo Mercado (Pos-Tagger and Syllabificator)
- Vivian Gongora Ronacher (NER)


General License Definitions
---------------------------

The following section contains the full license texts for Flask and the
documentation.

- "AUTHORS" hereby refers to all the authors listed in the
:ref:`authors` section.

- The ":ref:`chana-license`" applies to all the source code shipped as
part of Chana as well as documentation.

.. _chana-license:

Chana License
-------------

.. include:: ../LICENSE

36 changes: 36 additions & 0 deletions docs/make.bat
@@ -0,0 +1,36 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build
set SPHINXPROJ=chana

if "%1" == "" goto help

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%

:end
popd

0 comments on commit f2efecd

Please sign in to comment.