Skip to main content

Extract organization names from text using LLMs (OpenAI or Google Gemini).

Project description

FindOrg - Named Entity Recognition for Organizations using GPT

FindOrg is a Python package designed to perform Named Entity Recognition (NER), specifically targeting organizations within a given text. Leveraging OpenAI's powerful GPT models, it extracts organization names efficiently.

Installation

Before using FindOrg, ensure you have the necessary dependencies installed:

  • openai
  • pandas

Usage

from FindOrg import org

# Provide your OpenAI API key
openai_key = "YOUR_OPENAI_API_KEY"

# Sample text for analysis
text = "In the heart of Silicon Valley, a collaboration has emerged between global tech giants such as Google, Apple, and Facebook, aiming to revolutionize the digital landscape."

# Call the function
result_df = org(text, openai_key, model='gpt-3.5-turbo', save=False)

# Display the extracted organizations
print(result_df)

Arguments

  • text (str): Text to be analyzed.
  • openai_key (str): Your OpenAI API key.
  • model (str, optional): Model to be used for the analysis. Defaults to 'gpt-3.5-turbo'.
  • save (bool, optional): If True, the output will be saved as an Excel file named 'organizations.xlsx'. Defaults to False.

Returns

  • pandas.DataFrame: DataFrame containing the extracted organizations.

Output

The output DataFrame consists of a single column named "Organizations", containing the extracted organization names.

How to cite

Neves, L. F. F. (2024). FindOrg: Named Entity Recognition for Organizations using GPT [Python package]. https://pypi.org/project/FindOrg/.

Contact

luiz.felipe@ufg.br

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

findorg-1.0.0.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

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

findorg-1.0.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file findorg-1.0.0.tar.gz.

File metadata

  • Download URL: findorg-1.0.0.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.8

File hashes

Hashes for findorg-1.0.0.tar.gz
Algorithm Hash digest
SHA256 36443907407359818a6ad926da8a655bae195e955f3d9d3bb90a8094fe7648f4
MD5 fa53630bfa25e75a56d51caea625c796
BLAKE2b-256 85c198b21923ef763cfb1d80500dbdbdb28acd757a1004dbbf2849f3eb1f269a

See more details on using hashes here.

File details

Details for the file findorg-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: findorg-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.8

File hashes

Hashes for findorg-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2b6291deb8b44ec823ffd6e188bf947cb645655bab9dc0d74b0a81d3cb863a01
MD5 a564212e450dfa4ede36ebb750c4c22a
BLAKE2b-256 cd9e217e1a4b0f73e90b9b90e50e5bbb8901495d4f4c00cbc95a6fbfa8210607

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