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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file py-sdk-nocodeapi-0.0.1.tar.gz.

File metadata

  • Download URL: py-sdk-nocodeapi-0.0.1.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for py-sdk-nocodeapi-0.0.1.tar.gz
Algorithm Hash digest
SHA256 ae26ea34f36f0778a629b5d2c5d4d4f8c5c7f3991c37adcf05f66fb09526377a
MD5 7be62cbdb6506ced32679d013c7fdd41
BLAKE2b-256 875a197704e339629b5eee8f339f054f292997468d5784b0c318534bc63635dc

See more details on using hashes here.

File details

Details for the file py_sdk_nocodeapi-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: py_sdk_nocodeapi-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for py_sdk_nocodeapi-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6975e67cc0e64aa4bc2e511a410ef2d7894e5443a1620fea8c4ea521cb90483b
MD5 2d4999cf8f68e17f1b7e0dfb0332114f
BLAKE2b-256 11e8960ef36f31933b8ae90a85e8043db1928cd044a3179d158c8a64334a48cf

See more details on using hashes here.

Supported by

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