Skip to content

Releases: chicago-justice-project/article-tagging

Police Sentiment v0 in Production

05 Feb 23:42
2e62689
Compare
Choose a tag to compare
Merge pull request #147 from chicago-justice-project/1.3.1

publish new change

Adding police sentiment

12 Jan 22:53
d897020
Compare
Choose a tag to compare
Pre-release
Merge pull request #143 from chicago-justice-project/v1.2.3

up to 1.2.3

Best Location

18 Sep 01:49
22ed73a
Compare
Choose a tag to compare
  • adds "is_best" field inside db column trained_location to identify maximally likely location string
  • subs out deprecated .ix for .loc

v1.2.0

08 Aug 05:17
Compare
Choose a tag to compare
  • 🌎 Update geocoder to CJP-hosted Pelias instance.
  • 🏘️ Add support for finding community areas given lat/long.
  • ⬆️ Updated Data Loading to match database updates in https://github.com/chicago-justice-project/chicago-justice.
  • 🐛 Added more and better tests.
  • 📜 Lots of documentation updates.

You can install from pypi with

pip install tagnews

v1.1.0

17 Apr 03:36
Compare
Choose a tag to compare
  • 🌎 Added support for lat/long geocoding using the geocoder python library.
  • 🎉 Run continuous integration testing using travis

You can pip install from pypi with

pip install tagnews

v1.0.2

09 Mar 03:12
Compare
Choose a tag to compare
  • Fixes #92 by correctly listing h5py and geocoder packages as required for installation in setup.py.
  • Adds some lat/long capabilities, but more comprehensive features in this area will come later.

You can pip install from pypi with

pip install tagnews

See the installation guide for more detailed info.

v1.0.1

14 Feb 04:40
Compare
Choose a tag to compare
  • BREAKING API changes.
    • Now use tagnews.CrimeTag instead of tagnews.Tagger for type-of-crime tagging (name changed to differentiate crime tagging from geo tagging).
  • Pre-trained model to extract geostrings.
    • Use tagnews.GeoCoder.

Example use:

>>> import tagnews
>>> crimetags = tagnews.CrimeTags()
>>> article_text = 'The homicide occurred at the 1700 block of S. Halsted Ave. It happened just after midnight. Another person was killed at the intersection of 55th and Woodlawn, where a lone gunman'
>>> crimetags.tagtext_proba(article_text)
HOMI     0.739159
VIOL     0.146943
GUNV     0.134798
...
>>> crimetags.tagtext(article_text, prob_thresh=0.5)
['HOMI']
>>> geoextractor = tagnews.GeoCoder()
>>> prob_out = geoextractor.extract_geostring_probs(article_text)
>>> list(zip(*prob_out))
[..., ('at', 0.0044685714), ('the', 0.005466637), ('1700', 0.7173856), ('block', 0.81395197), ('of', 0.82227415), ('S.', 0.7940061), ('Halsted', 0.70529455), ('Ave.', 0.60538065), ...]
>>> geoextractor.extract_geostrings(article_text, prob_thresh=0.5)
[['1700', 'block', 'of', 'S.', 'Halsted', 'Ave.'], ['55th', 'and', 'Woodlawn,']]
>>> import os; import psutil
>>> print('Memory usage: {} MB'.format(psutil.Process(os.getpid()).memory_info().rss / (1024 ** 2)))
Memory usage: 524.7265625 MB

You can pip install from pypi with

pip install tagnews

See the installation guide for more detailed info.

v0.6.0

02 Dec 03:26
Compare
Choose a tag to compare
  • Code to load GloVe word vectorizer.
  • Example of using Google API to geo-tag a location string. (Thanks @m00nd00r)
  • Code to load Named Entity Recognition (NER) data downloadable from kaggle.
  • Better documentation. (Thanks @jherzberg)
  • Fix setup.py requirements. (Thanks @meshulam for pointing the problem out!)

You can pip install from pypi with

pip install tagnews

See the installation guide for more detailed info.

v0.5.0

07 Oct 03:22
Compare
Choose a tag to compare