semvec/pypi-packages huggingface dataset:
ym 1.0.2
Data type that handles year and month values.
License: MIT

# ym
Data type that handles year and month values.

[![Build Status](https://travis-ci.org/hoto17296/python-ym.svg)](https://travis-ci.org/hoto17296/python-ym)

## Usage

### Import
``` python
from ym import ym
```

### Initialize
from year, month

``` python
ym(2020, 4)  #=> ym(2020, 4)
```

from current month

``` python
ym.current()  #=> ym(2020, 7)
```

from string

``` python
ym.parse("2020-04")  #=> ym(2020, 4)
```

from date or datetime object

``` python
from datetime import date

ym.parse(date.today())  #=> ym(2020, 7)
```

### Get year, month
``` python
current = ym.current()  #=> ym(2020, 7)
current.y  #=> 2020
current.m  #=> 7
```

### Add, Sub
``` python
ym(2020, 4) + 10  #=> ym(2021, 2)
ym(2020, 4) - 10  #=> ym(2019, 6)
```

``` python
ym(2020, 7) - ym(2020, 4)  #=> 3
```


### Compare
``` python
ym(2020, 7) < ym(2020, 4)  #=> False
ym(2020, 7) > ym(2020, 4)  #=> True
ym(2020, 7) == ym(2020, 4)  #=> False
```

### Range
``` python
list(ym(2020, 4).to(2020, 7))  #=> [ym(2020, 4), ym(2020, 5), ym(2020, 6)]
```

``` python
current = ym.current()  #=> ym(2020, 7)
list(current.to(current + 6))  #=> [ym(2020, 7), ym(2020, 8), ym(2020, 9), ym(2020, 10), ym(2020, 11), ym(2020, 12)]
```
nlptriples 0.1.7
A package to extract Triples in form of [predictate , object , subject]  form text 
License: MIT
Requires Python: >=3.6,<4.0
Keywords: Poetry,NLP,Triples

# NLPTriples
Extract NLP (RDF) Triples from a sentence

# Overview
A minimalistic library to extract triples from sentences. Implemented [paper](http://ailab.ijs.si/dunja/SiKDD2007/Papers/Rusu_Trippels.pdf) 

Converted the [api](https://github.com/tdpetrou/RDF-Triple-API) created by [Ted Petrou](https://github.com/tdpetrou) to a simple library which can be be run directly.

# Installation 
Install using pip

```pip install nlptriples```

# Usage
```python
from nlptriples import triples,setup
rdf = triples.RDF_triple()
triple = rdf.extract(sent)
print(triple)
```

# Imeplemetation
1. Constituency Parse tree is create using Berkeley Neural Parser library. (the paper uses CoreNLP)
2. The algorithm described in the [paper](http://ailab.ijs.si/dunja/SiKDD2007/Papers/Rusu_Trippels.pdf) is used to extract triples from parse trees.