semvec/pypi-packages huggingface dataset:
marso 0.0.3
A Move Parser
License: MIT
Requires Python: >=3.7
Keywords: move/libra parser

###################################################################
marso - A Move(Libra) Parser (Not Ready)
###################################################################


.. image:: https://img.shields.io/pypi/v/marso.svg
    :target: https://pypi.org/project/marso/
    :alt: Marso

.. image:: https://img.shields.io/badge/license-MIT-blue.svg
    :target: ./LICENSE
    :alt: MIT licensed

.. image:: https://github.com/yuan-xy/marso/workflows/Python%20package/badge.svg
    :target: https://github.com/yuan-xy/marso/actions
    :alt: Python package



Marso is a Move language parser that supports error recovery and round-trip parsing
. Marso is also able to list multiple syntax errors in your move source file.

Marso has been battle-tested by jedi_. 

Marso consists of a small API to parse Move language and analyse the syntax tree.

A simple example:

.. code-block:: python

    >>> import marso
    >>> module = marso.parse('hello + 1', version="3.6")
    >>> expr = module.children[0]
    >>> expr
    PythonNode(arith_expr, [<Name: hello@1,0>, <Operator: +>, <Number: 1>])
    >>> print(expr.get_code())
    hello + 1
    >>> name = expr.children[0]
    >>> name
    <Name: hello@1,0>
    >>> name.end_pos
    (1, 5)
    >>> expr.end_pos
    (1, 9)

To list multiple issues:

.. code-block:: python

    >>> grammar = marso.load_grammar()
    >>> module = grammar.parse('foo +\nbar\ncontinue')
    >>> error1, error2 = grammar.iter_errors(module)
    >>> error1.message
    'SyntaxError: invalid syntax'
    >>> error2.message
    "SyntaxError: 'continue' not properly in loop"

Resources
=========

- `Testing <https://marso.readthedocs.io/en/latest/docs/development.html#testing>`_
- `PyPI <https://pypi.python.org/pypi/marso>`_
- `Docs <https://marso.readthedocs.org/en/latest/>`_
- Uses `semantic versioning <https://semver.org/>`_

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

    pip install marso



Acknowledgements
================

- David Halter (@davidhalter) for the original `Parso <https://github.com/davidhalter/parso>`_ project.
- Guido van Rossum (@gvanrossum) for creating the parser generator pgen2
  (originally used in lib2to3).


.. _jedi: https://github.com/yuan-xy/jedi


.. :changelog:

Changelog
---------

0.0.1 (2020-05-29)
+++++++++++++++++++

- Test publish as a pip package, not work yet.
pysentiment2 0.1.1
Sentiment Analysis in Python using a Dictionary Approach
License: MIT


[![](https://codecov.io/gh/nickderobertis/pysentiment/branch/master/graph/badge.svg)](https://codecov.io/gh/nickderobertis/pysentiment)

# pysentiment

## Overview

This is a library for sentiment analysis in dictionary framework.
Two dictionaries are provided in the library, namely, Harvard IV-4 and
Loughran and McDonald Financial Sentiment Dictionaries, which are sentiment
dictionaries for general and financial sentiment analysis.

See also http://www.wjh.harvard.edu/~inquirer/ and https://www3.nd.edu/~mcdonald/Word_Lists.html .

### Introduction

`Positive` and `Negative` are word counts for the words in positive and negative sets.


`Polarity` and `Subjectivity` are calculated in the same way of Lydia system.
See also http://www.cs.sunysb.edu/~skiena/lydia/


## Getting Started

Install `pysentiment2`:

```
pip install pysentiment2
```

A simple example:

```python
import pysentiment2

# Do something with pysentiment2
```

## Usage

To use the Harvard IV-4 dictionary, create an instance of the `HIV4` class

```python
import pysentiment2 as ps
hiv4 = ps.HIV4()
tokens = hiv4.tokenize(text)  # text can be tokenized by other ways
                                  # however, dict in HIV4 is preprocessed
                                  # by the default tokenizer in the library
score = hiv4.get_score(tokens)
```

`HIV4` is a subclass for `pysentiment2.base.BaseDict`. `BaseDict` can be inherited by 
implmenting `init_dict` to initialize `_posset` and `_negset` for the dictionary
to calculate 'positive' or 'negative' scores for terms.

Similarly, to use the Loughran and McDonald dictionary:
```python
import pysentiment2 as ps
lm = ps.LM()
tokens = lm.tokenize(text)
score = lm.get_score(tokens)
```

## Links

See the
[documentation here.](
https://nickderobertis.github.io/pysentiment/
)

## Author

`pysentiment2` created by Nick DeRobertis but based on `pysentiment` by Zhichao Han. GNU GPL License.