Skip to main content
Autotagger
=====

Autotagger helps automatically create text links between related objects in Django applications as well as cross-reference by arbitrary admin-defined strings.

Takes a given block of text and tags it according to models and fields defined in settings.

### Installation
``` pip install tango-autotagger ```

### SETUP

Example:

AUTOTAG_CONTENT = (
{
'model' : 'schools.school',
'field' : 'school',
'check' : 'is_active',
'm2m_field' : 'articles',
'reverse_m2m': 'politicians',
},
... etc ...
)


THE FIELDS...

model:
the app and model to check
field:
the particular field/value you are matching in the text
check:
an optional field to filter by. Maybe. If we can figure out how to do it...
m2m_field:
Optional. Will add the current object to a m2m field on the remote object.
For example, if you are auto_tagging schools in articles
you can add the article to the schools "articles" field.
reverse_m2m:
Optional. Will add the remote object to a m2m field on the current object.
For example, politicians can be a m2m on articles in some cases.
If you were tagging politicians in articles, this would add the politician
to the article's "politicians" field.

Do NOT attempt to use both m2m and reverse_m2m on the same setting.

To insert links to matching objects:

from autotagger.autotag_content import autotag

tagged_text = autotag(article.text)



Metadata

Release files for tango-autotagger 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tango-autotagger 0.3.0
File Size Uploaded
tango-autotagger-0.3.0.tar.gz 5.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tango-autotagger 0.3.0
File Interpreter ABI Platform
tango_autotagger-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.4 kB

Release files / tango-autotagger-0.3.0.tar.gz

Download URL tango-autotagger-0.3.0.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e0fbcf79a4a6847a68782f2cb3827fd675b5bceb78486d483e83b20d368c3ff8
BLAKE2b-256 checksum
How to use checksums
56f2355b87051ab0fd2f82f30b3d9a67463fd4cd729954e413691aa003c25e0d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / tango_autotagger-0.3.0-py3-none-any.whl

Download URL tango_autotagger-0.3.0-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
71f1a0e1fcb9b176178320ad99bfc856be83a23ad05747a6426c3dd3af3e02ae
BLAKE2b-256 checksum
How to use checksums
c4002ebe505b742ace1c88048f1b8cc1bf1e126de2f7df3151886412c16653df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page