Skip to main content

Software name disambiguation pipeline

Project description

SONAD: Software Name Disambiguation

License
Python

SONAD (Software Name Disambiguation) is a command-line tool and Python package that links software mentions in scientific papers to their corresponding repository URLs. It leverages NLP, third-party tools like SOMEF, and metadata to resolve software names. It is limited to fetching URLs from GitHub, PyPI and CRAN. Take into account that this is not 100% accurate as it uses a machine learning model trained on data, but it did outperform models llama-3.1-8b-instant, qwen-qwq-32b, gemma2-9b-it and deepseek-r1-distill-llama-70b.


Installation

Install using pip:

pip install sonad

Initial Configuration

Before using SONAD, you must make sure that SOMEF works
(https://github.com/KnowledgeCaptureAndDiscovery/somef/?tab=readme-ov-file),
which is used for software metadata extraction.

Follow their instructions to make sure somef runs correctly on your system. It is installed with sonad, but the user should check if somef works before running sonad.

It is also strongly recommended to provide a GitHub API token to avoid rate limits when querying GitHub. You can configure this for sonad and somef once using:

If you wish not to use GitHub token, you then need to configure somef with automatic option (somef configure -a).

sonad configure

Your token will be saved for future runs.


Requirements

SONAD requires Python 3.10. All dependencies are installed automatically.

Some key libraries:

  • pandas
  • scikit-learn
  • xgboost
  • sentence-transformers
  • beautifulsoup4
  • requests
  • SPARQLWrapper
  • somef
  • textdistance
  • lxml
  • cloudpickle

Usage

After installation, you can run the main command:

sonad process -i <input_file.csv> -o <output_file.csv> [-t <temp_folder>] 

Parameters

  • -i, --input (required): Path to the input CSV file.
  • -o, --output (required): Path where the output CSV will be saved.
  • -t, --temp (optional): Folder where temporary files will be written it the folder is provided.

Input Format

The input CSV must contain the following columns:

  • name: The software name mentioned in the paper.
  • doi: The DOI of the paper.
  • paragraph: The paragraph in which the software is mentioned.

Optionally, it can include:

  • candidate_urls: A comma-separated list of candidate software URLs that might correspond to the software.

Example:

name,doi,paragraph,candidate_urls
Scikit-learn,10.1000/xyz123,"We used Scikit-learn for classification.","https://github.com/scikit-learn/scikit-learn"

Output Format

The output CSV will contain one row for each input mention, with the following columns:

  • name: The software name from the input.
  • paragraph: The paragraph where the software was mentioned.
  • doi: The DOI of the paper in which the software was mentioned.
  • synonyms: Alternative names or variants of the software name identified during processing.
  • language: The inferred programming language(s) used by the software, if available.
  • authors: Names of authors of the paper it they can be fetched from OpenAlex tool.
  • urls: A comma-separated list of predicted repository or project URLs (e.g., GitHub, PyPI, CRAN).
  • not_urls: URLs that were considered but rejected during disambiguation (e.g., due to low confidence or irrelevance).

Example:

name,paragraph,doi,synonyms,language,authors,urls,not_urls
Scikit-learn,"We used Scikit-learn for classification.",10.1000/xyz123,"scikit learn;sklearn",Python,"Pedregosa et al.","https://github.com/scikit-learn/scikit-learn","https://pypi.org/project/sklearn/"

License

MIT License © Jelena Djuric
https://github.com/jelenadjuric01


Contributions

Feel free to submit issues or pull requests on the GitHub repository:
https://github.com/jelenadjuric01/Software-Disambiguation

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

sonad-0.1.3.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

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

sonad-0.1.3-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

Details for the file sonad-0.1.3.tar.gz.

File metadata

  • Download URL: sonad-0.1.3.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.10.17 Linux/6.11.0-1015-azure

File hashes

Hashes for sonad-0.1.3.tar.gz
Algorithm Hash digest
SHA256 15bd9cb434c65f4777d933c38f25a8ae6a8638b5619e58aa15ab7e043d1f70f5
MD5 9f6ebaf3f1aadfc54c1aed1d0fd8eb4c
BLAKE2b-256 10ffb988472731cc54fa8910a35b9991ec2ed3a3d7f42f49d940ccd76069e897

See more details on using hashes here.

File details

Details for the file sonad-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: sonad-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.10.17 Linux/6.11.0-1015-azure

File hashes

Hashes for sonad-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0a296fab77eee0c9d5f36c19ab948cef0bd9d84cb5edae3498c6e12a8039dd91
MD5 b06723a543ccc67595dd4ab7a02b20f2
BLAKE2b-256 8ee00b31dcee38ead6ec88675e02a2a00bc08881a097db1818eaf46a9af1e15e

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