Skip to content

Commit 4ad6127

Browse files
committed
Update package version to include new changes.
1 parent 852ca62 commit 4ad6127

26 files changed

+190
-89
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ pip-selfcheck.json
1111
rake_nltk.egg-info/
1212
.tox/
1313
.coverage
14+
coverage.xml
1415
htmlcov/

CHANGELOG.rst

+7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
Release History
22
===============
33

4+
v1.0.5
5+
------
6+
* Adding python typing for better/clear interfaces.
7+
* Found a bug in phrase list which was being returned as a set causing it to drop repeated
8+
phrases and consider only the first one. Provided control over this as a flag that Rake takes
9+
so that users can control the behaviour.
10+
411
v1.0.4
512
------
613
* Adding support for min and max words (inclusive) limits for ranked phrases.

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
[![pypiv](https://img.shields.io/pypi/v/rake-nltk.svg)](https://pypi.python.org/pypi/rake-nltk)
44
[![pyv](https://img.shields.io/pypi/pyversions/rake-nltk.svg)](https://pypi.python.org/pypi/rake-nltk)
5-
[![Build Status](https://github.com/csurfer/rake-nltk/actions/workflows/pytest.yml/badge.svg?branch=master)](https://github.com/csurfer/rake-nltk/actions/workflows/pytest.yml/badge.svg?branch=master)
5+
[![Build Status](https://github.com/csurfer/rake-nltk/actions/workflows/pytest.yml/badge.svg?branch=master)](https://github.com/csurfer/rake-nltk/actions)
6+
[![codecov](https://codecov.io/gh/csurfer/rake-nltk/branch/master/graph/badge.svg?token=ghRhWVec9X)](https://codecov.io/gh/csurfer/rake-nltk)
67
[![Licence](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/csurfer/rake-nltk/master/LICENSE)
78

89
RAKE short for Rapid Automatic Keyword Extraction algorithm, is a domain independent keyword extraction algorithm which tries to determine key phrases in a body of text by analyzing the frequency of word appearance and its co-occurance with other words in the text.

README.rst

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
rake-nltk
22
=========
33

4-
|pypiv| |pyv| |Licence| |Build Status| |Coverage Status| |Thanks|
4+
|pypiv| |pyv| |Licence| |Build Status| |Coverage Status|
55

66
RAKE short for Rapid Automatic Keyword Extraction algorithm, is a domain
77
independent keyword extraction algorithm which tries to determine key
@@ -118,16 +118,14 @@ If you found the utility helpful you can buy me a cup of coffee using
118118
.. _NLTK: http://www.nltk.org/
119119
.. _issue tracker: https://github.com/csurfer/rake-nltk/issues
120120

121-
.. |Build Status| image:: https://travis-ci.org/csurfer/rake-nltk.svg?branch=master
122-
:target: https://travis-ci.org/csurfer/rake-nltk
121+
.. |Build Status| image:: https://github.com/csurfer/rake-nltk/actions/workflows/pytest.yml/badge.svg
122+
:target: https://github.com/csurfer/rake-nltk/actions
123123
.. |Licence| image:: https://img.shields.io/badge/license-MIT-blue.svg
124124
:target: https://raw.githubusercontent.com/csurfer/rake-nltk/master/LICENSE
125-
.. |Coverage Status| image:: https://coveralls.io/repos/github/csurfer/rake-nltk/badge.svg?branch=master
126-
:target: https://coveralls.io/github/csurfer/rake-nltk?branch=master
125+
.. |Coverage Status| image:: https://codecov.io/gh/csurfer/rake-nltk/branch/master/graph/badge.svg?token=ghRhWVec9X
126+
:target: https://codecov.io/gh/csurfer/rake-nltk
127127
.. |Demo| image:: http://i.imgur.com/wVOzU7y.gif
128128
.. |pypiv| image:: https://img.shields.io/pypi/v/rake-nltk.svg
129129
:target: https://pypi.python.org/pypi/rake-nltk
130130
.. |pyv| image:: https://img.shields.io/pypi/pyversions/rake-nltk.svg
131131
:target: https://pypi.python.org/pypi/rake-nltk
132-
.. |Thanks| image:: https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg
133-
:target: https://saythanks.io/to/csurfer

docs/_build/html/.buildinfo

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: 6ad6e3e11231cea41b34beb1c2b191c5
3+
config: 8552c64675e11083f929cafe599db8ba
44
tags: 645f666f9bcd5a90fca523b33c5a78b7
1.61 KB
Binary file not shown.
10.6 KB
Binary file not shown.
3.1 KB
Binary file not shown.
-755 Bytes
Binary file not shown.

docs/_build/html/_modules/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<head>
66
<meta charset="utf-8" />
77
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
8-
<title>Overview: module code &#8212; rake-nltk 1.0.4 documentation</title>
8+
<title>Overview: module code &#8212; rake-nltk 1.0.5 documentation</title>
99
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
1010
<link rel="stylesheet" type="text/css" href="../_static/alabaster.css" />
1111
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>

docs/_build/html/_modules/rake_nltk/rake.html

+90-44
Large diffs are not rendered by default.

docs/_build/html/_sources/advanced.rst.txt

+17
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,20 @@ ranking
7272
from rake_nltk import Rake
7373
7474
r = Rake(min_length=2, max_length=4)
75+
76+
to control whether or not to include repeated phrases in text
77+
-------------------------------------------------------------
78+
79+
So that user can choose to include all phrases generated from text or to
80+
include phrases only once. Example: "Magic systems is a company. Magic systems
81+
was founded in a garage" has the phrase (magic, systems) occuring twice.
82+
83+
.. code:: python
84+
85+
from rake_nltk import Rake
86+
87+
# To include all phrases even the repeated ones.
88+
r = Rake() # Equivalent to Rake(include_repeated_phrases=True)
89+
90+
# To include all phrases only once and ignore the repetitions
91+
r = Rake(include_repeated_phrases=False)

docs/_build/html/_sources/index.rst.txt

+6-8
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
rake-nltk
1111
=========
1212

13-
|pypiv| |pyv| |Licence| |Build Status| |Coverage Status| |Thanks|
13+
|pypiv| |pyv| |Licence| |Build Status| |Coverage Status|
1414

1515
RAKE short for Rapid Automatic Keyword Extraction algorithm, is a domain
1616
independent keyword extraction algorithm which tries to determine key
@@ -149,16 +149,14 @@ If you found the utility helpful you can buy me a cup of coffee using
149149
.. _NLTK: http://www.nltk.org/
150150
.. _issue tracker: https://github.com/csurfer/rake-nltk/issues
151151

152-
.. |Build Status| image:: https://travis-ci.org/csurfer/rake-nltk.svg?branch=master
153-
:target: https://travis-ci.org/csurfer/rake-nltk
152+
.. |Build Status| image:: https://github.com/csurfer/rake-nltk/actions/workflows/pytest.yml/badge.svg
153+
:target: https://github.com/csurfer/rake-nltk/actions
154154
.. |Licence| image:: https://img.shields.io/badge/license-MIT-blue.svg
155155
:target: https://raw.githubusercontent.com/csurfer/rake-nltk/master/LICENSE
156-
.. |Coverage Status| image:: https://coveralls.io/repos/github/csurfer/rake-nltk/badge.svg?branch=master
157-
:target: https://coveralls.io/github/csurfer/rake-nltk?branch=master
156+
.. |Coverage Status| image:: https://codecov.io/gh/csurfer/rake-nltk/branch/master/graph/badge.svg?token=ghRhWVec9X
157+
:target: https://codecov.io/gh/csurfer/rake-nltk
158158
.. |Demo| image:: http://i.imgur.com/wVOzU7y.gif
159159
.. |pypiv| image:: https://img.shields.io/pypi/v/rake-nltk.svg
160160
:target: https://pypi.python.org/pypi/rake-nltk
161161
.. |pyv| image:: https://img.shields.io/pypi/pyversions/rake-nltk.svg
162-
:target: https://pypi.python.org/pypi/rake-nltk
163-
.. |Thanks| image:: https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg
164-
:target: https://saythanks.io/to/csurfer
162+
:target: https://pypi.python.org/pypi/rake-nltk

docs/_build/html/_static/documentation_options.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
var DOCUMENTATION_OPTIONS = {
22
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
3-
VERSION: '1.0.4',
3+
VERSION: '1.0.5',
44
LANGUAGE: 'None',
55
COLLAPSE_INDEX: false,
66
BUILDER: 'html',

docs/_build/html/advanced.html

+17-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<meta charset="utf-8" />
77
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
88

9-
<title>Usage Details &#8212; rake-nltk 1.0.4 documentation</title>
9+
<title>Usage Details &#8212; rake-nltk 1.0.5 documentation</title>
1010
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
1111
<link rel="stylesheet" type="text/css" href="_static/alabaster.css" />
1212
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
@@ -53,6 +53,7 @@ <h3><a href="index.html">Table of Contents</a></h3>
5353
<li><a class="reference internal" href="#to-provide-your-own-list-of-stop-words-and-punctuations">to provide your own list of stop words and punctuations</a></li>
5454
<li><a class="reference internal" href="#to-control-the-metric-for-ranking">to control the metric for ranking</a></li>
5555
<li><a class="reference internal" href="#to-control-the-max-or-min-words-in-a-phrase">to control the max or min words in a phrase</a></li>
56+
<li><a class="reference internal" href="#to-control-whether-or-not-to-include-repeated-phrases-in-text">to control whether or not to include repeated phrases in text</a></li>
5657
</ul>
5758
</li>
5859
</ul>
@@ -152,6 +153,21 @@ <h2>to control the max or min words in a phrase<a class="headerlink" href="#to-c
152153
</pre></div>
153154
</div>
154155
</section>
156+
<section id="to-control-whether-or-not-to-include-repeated-phrases-in-text">
157+
<h2>to control whether or not to include repeated phrases in text<a class="headerlink" href="#to-control-whether-or-not-to-include-repeated-phrases-in-text" title="Permalink to this headline"></a></h2>
158+
<p>So that user can choose to include all phrases generated from text or to
159+
include phrases only once. Example: “Magic systems is a company. Magic systems
160+
was founded in a garage” has the phrase (magic, systems) occuring twice.</p>
161+
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">rake_nltk</span> <span class="kn">import</span> <span class="n">Rake</span>
162+
163+
<span class="c1"># To include all phrases even the repeated ones.</span>
164+
<span class="n">r</span> <span class="o">=</span> <span class="n">Rake</span><span class="p">()</span> <span class="c1"># Equivalent to Rake(include_repeated_phrases=True)</span>
165+
166+
<span class="c1"># To include all phrases only once and ignore the repetitions</span>
167+
<span class="n">r</span> <span class="o">=</span> <span class="n">Rake</span><span class="p">(</span><span class="n">include_repeated_phrases</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
168+
</pre></div>
169+
</div>
170+
</section>
155171
</section>
156172

157173

0 commit comments

Comments
 (0)