Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added changes for new api for entity and topic classification #518

Merged
merged 10 commits into from
Sep 10, 2024

Conversation

gr8nishan
Copy link
Collaborator

@gr8nishan gr8nishan commented Aug 29, 2024

Created an api which can take text as input and return the entity and topic classification.

payload = {
"data": text,
"mode": "entity"/"topic"/"all"
"anonymize": True/False/Optional
}

"mode" is optional. It defaults to both entity and topic.
"anonymize" is an optional field if not sent, it will be considered False. If sent True then it will return the anonymized text.

If annonymize False:

{'entityCount': 1, 'entities': {'us-ssn': 1}, 'entityDetails': {'us-ssn': [{'location': '17_28', 'confidence_score': 'HIGH', 'entity_group': 'pii-identification'}]}, 'topicCount': 0, 'topics': {}, 'topicDetails': {}}

If annonymize True

{'data': "\nSachin's SSN is <US_SSN>\n", 'entityCount': 1, 'entities': {'us-ssn': 1}, 'entityDetails': {'us-ssn': [{'location': '17_25', 'confidence_score': 'HIGH', 'entity_group': 'pii-identification'}]}, 'topicCount': 0, 'topics': {}, 'topicDetails': {}}

pebblo/app/api/api.py Outdated Show resolved Hide resolved
pebblo/app/api/api.py Outdated Show resolved Hide resolved
pebblo/app/service/classification.py Outdated Show resolved Hide resolved
pebblo/app/service/classification.py Outdated Show resolved Hide resolved
tests/app/service/test_classification.py Outdated Show resolved Hide resolved
srics
srics previously approved these changes Sep 8, 2024
pebblo/app/service/classification.py Outdated Show resolved Hide resolved
pebblo/app/routers/routers.py Show resolved Hide resolved
pebblo/app/service/classification.py Outdated Show resolved Hide resolved
pebblo/app/service/classification.py Outdated Show resolved Hide resolved
pebblo/app/service/classification.py Show resolved Hide resolved
@srics srics merged commit df01788 into daxa-ai:main Sep 10, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants