Skip to main content

An SDK for nocodeapi.net

Project description

Python nocodeapi.net SDK

Installation

pip install py-sdk-nocodeapi

Place .env file into root directory and DEV_JWT_TOKEN variable into this file.

Key phrases

import py-sdk-nocodeapi

nc = NoCodeAPI()
res = nc.key_phrases("Now, as a nation, we don't promise equal outcomes, "
                          "but we were founded on the idea everybody "
                          "should have an equal opportunity "
                          "to succeed. No matter who you are, what you look like, "
                          "where you come from, "
                          "you can make it. That's an essential promise.", 'en_US')

    # [
    #     {
    #         "Text": "promise equal outcomes",
    #         "Score": 8,
    #         "BeginOffset": 27,
    #         "EndOffset": 49
    #     },
    #     {
    #         "Text": "equal opportunity",
    #         "Score": 4.5,
    #         "BeginOffset": 108,
    #         "EndOffset": 125
    #     },
    #     {
    #         "Text": "essential promise",
    #         "Score": 4.5,
    #         "BeginOffset": 229,
    #         "EndOffset": 246
    #     },
    #     {
    #         "Text": "nation",
    #         "Score": 1,
    #         "BeginOffset": 10,
    #         "EndOffset": 16
    #     },
    #     {
    #         "Text": "founded",
    #         "Score": 1,
    #         "BeginOffset": 63,
    #         "EndOffset": 70
    #     }
    #     ...
    # ]

Language Detection

nc = NoCodeAPI()
res = nc.language_detect("Policjanci otrzymali zgłoszenie w tej sprawie po godz 9. "
                                      "Do wypadku doszło na ul. Kolonia Krakowskie Przedmieście.")

# res['LanguageCode'] // pl  
# res['Language'] // Polish
# res['Score'] // 1

Sentiment Analysis

res = self.nc.emotions('Genuine leather is the best production for bags imho, but '
                       'I would not recommend this particular product.')

# res['Positive'] // 0.12
# res['Negative'] // 0.14
# res['Neutral'] // 9.74
# res['Mixed'] // 9.97

Named Entity Recognition

res = self.nc.ner('Linus Torvalds is one of the best programmers in USA, Finland Helsinki and in the world')

# res['EntitiesCount'] # 3

# res['Entities'] 

# [
#   {
# 		Text: "Linus Torvalds",
# 		Label: "PERSON",
# 	},
# 	{
# 		Text: "USA",
# 		Label: "GPE",
# 	},
# 	{
# 		Text: "Finland Helsinki",
# 		Label: "GPE",
# 	}
# ]

Personally Identifiable Information

res = self.nc.pii('I had a card number 4234-4284-2422-2344 and '
                  'I wanted 4235 4284 2433 2347 to pay by slip, my phone number was +7 (916) 286-19-39 ')

# res['EntitiesCount'] # 3
# res['Entities'] 
# [
# {
#   'Type': 'CREDIT_DEBIT_NUMBER', 
#   'Text': '4234428424222344', 
#   'SubType': 'Visa',
#   'BeginOffset': 20, 'EndOffset': 39
# },
# {
#   'Type': 'CREDIT_DEBIT_NUMBER', 
#   'Text': '4235428424332347', 
#   'SubType': 'Visa',
#   'BeginOffset': 53, 
#   'EndOffset': 72
# },
# {
#   'Type': 'PHONE_NUMBER', 
#   'Text': '(916) 286-19-39',
#   'BeginOffset': 112, 
#   'EndOffset': 127
# }
# ]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py-sdk-nocodeapi-0.0.1.tar.gz (2.9 kB view hashes)

Uploaded Source

Built Distribution

py_sdk_nocodeapi-0.0.1-py3-none-any.whl (3.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page