Saravanan666/pypi-org huggingface dataset:
Package: ontodev-valve
valve.pyVALVE bindings for PythonInstall/setup from sourceRetrieve valve.py from GitHub:git clone git@github.com:ontodev/valve.py.git
 cd valve.py
 make testActivate the virtual environment:source valve.rs/.venv/bin/activateAdd the statementimport ontodev_valveto the top of your python script.Usage examplesSee the filetest/main.pyfor usage examples.API referencevalve(table_table, db_path, command, verbose, config_table="table")Given a path to a configuration table (either a table.tsv file or a database containing a
table named "table"), and a directory in which to find/create a database: configure the
database using the configuration which can be looked up using the table table, and
optionally create and/or load it according to the value ofcommand(seeValve Command). If theverboseflag is set to true, output status
messages while loading. Ifconfig_table(which defaults to "table") is given andtable_tableindicates a database, query the table calledconfig_tablefor the
table table information. Returns the configuration map as a String.get_matching_values(config, db_path, table_name, column_name, matching_string)Given a config map represented as a JSON string, a directory containing the database, the table name and column name from which to retrieve matching values, return a JSON array (represented as a string) of possible valid values for the given column which contain the matching string (optional) as a substring (or all of them if no matching string is given). The JSON array returned is formatted for Typeahead, i.e., it takes the form:[{"id": id, "label": label, "order": order}, ...].validate_row(config, db_path, table_name, row, existing_row, row_number)Given a config map represented as a JSON string, a directory in which to find the database, a table name, a row, and if the row already exists in the database, its associated row number (optional), perform both intra- and inter-row validation and return the validated row as a JSON string.update_row(config, db_path, table_name, row, row_number)Given a config map represented as a JSON string, a directory in which the database is located, a table name, a row represented as a JSON string, and its associated row number, update the row in the database.insert_new_row(config, db_path, table_name, row)Given a config map represented as a JSON string, a directory in which the database is located, a table name, and a row represented as a JSON string, insert the new row to the database.ValveCommandThe following commands may be used with the valve() function.ValveCommand.ConfigConfigure but do not create or load.ValveCommand.CreateConfigure and create but do not load.ValveCommand.LoadConfigure, create, and load.Before creating a new releaseEdit the fileVALVE.VERSIONand adjust the version of valve.py (and, if necessary, valve.rs). After pushing your commit, create a new release in GitHub with the new version number as the release name and tag.
Package: ontodocs
OntodocsOntodocs is a Python command line application aimed at facilitating the creation of documentation for ontologies encoded in RDF/OWL.LinksPypi homeGithub homeExamplesSchema.orgdocumentation.FOAFdocumentation.That's the kind of documentation OntoDocs can generate out-of-the-box. For even more examples,take a look at this page.Installationpip install ontodocs -UDescriptionOntodocs allows to generate documentation for an RDF vocabulary, using visualization algorithms that create simple HTML pages, Markdown files, or more complex javascript interactive charts based on D3.js.> Ontodocs -h
Usage: ontodocs [OPTIONS] [SOURCE]...

  Ontodocs allows to create  documentation for ontologies encoded in
  RDF/OWL.

  E.g.:

  > ontodocs http://www.w3.org/2008/05/skos# --theme random -o
  ~/Desktop/skos

  ==> generates html docs for the SKOS ontology and save it to your desktop

Options:
  -o, --outputpath TEXT  Output path (default: home folder).
  -t, --title TEXT       Title for the visualization (default=graph uri).
  --theme TEXT           CSS Theme for the html-complex visualization
                         (random=use a random theme).
  --showthemes           Show the available CSS theme choices.
  -v, --verbose          Verbose mode.
  -h, --help             Show this message and exit.The library is not really meant to be used programmatically, but I'm sure there are a few constructs in there which can be reused.In a nutshell, all visualizations inherit from aVizFactoryclass that abstracts away the most common operations involved in rendering a dataviz.This is how you would invoke a visualization from a script:import ontospy
from ontodocs.viz.viz_html_single import *

g = ontospy.Ontospy("http://cohere.open.ac.uk/ontology/cohere.owl#")

v = HTMLVisualizer(g) # => instantiate the visualization object
v.build() # => render visualization. You can pass an 'output_path' parameter too
v.preview() # => open in browserDependenciesOntodocs relies on theOntoSpylibrary, which itself relies onRdflib.note: the functionalities of Ontodocs used to be part of OntoSpy until v1.8.
Package: ontogpt
OntoGPTIntroductionOntoGPTis a Python package for extracting structured information from text with large language models (LLMs),instruction prompts, and ontology-based grounding.Two different strategies for knowledge extraction are currently implemented in OntoGPT:For more details, please see the full documentation.Quick StartOntoGPT runs on the command line, though there's also a minimal web app interface (seeWeb Applicationsection below).Ensure you have Python 3.9 or greater installed.Install withpip:pipinstallontogptSet your OpenAI API key:runoakset-apikey-eopenai<youropenaiapikey>See the list of all OntoGPT commands:ontogpt--helpTry a simple example of information extraction:echo"One treatment for high blood pressure is carvedilol.">example.txt
ontogptextract-iexample.txt-tdrugOntoGPT will retrieve the necessary ontologies and output results to the command line. Your output will provide all extracted objects under the headingextracted_object.Web ApplicationThere is a bare bones web application for running OntoGPT and viewing results.First, install the required dependencies withpipby running the following command:pipinstallontogpt[web]Then run this command to start the web application:web-ontogptNOTE: We do not recommend hosting this webapp publicly without authentication.EvaluationsOpenAI's functions have been evaluated on test data. Please see the full documentation for details on these evaluations and how to reproduce them.Related ProjectsTALISMAN, a tool for generating summaries of functions enriched within a gene set. TALISMAN uses OntoGPT to work with LLMs.Tutorials and PresentationsPresentation: "Staying grounded: assembling structured biological knowledge with help from large language models" - presented by Harry Caufield as part of the AgBioData Consortium webinar series (September 2023)SlidesVideoPresentation: "Transforming unstructured biomedical texts with large language models" - presented by Harry Caufield as part of the BOSC track at ISMB/ECCB 2023 (July 2023)SlidesVideoPresentation: "OntoGPT: A framework for working with ontologies and large language models" - talk by Chris Mungall at Joint Food Ontology Workgroup (May 2023)SlidesVideoCitationThe information extraction approach used in OntoGPT, SPIRES, is described further in: Caufield JH, Hegde H, Emonet V, Harris NL, Joachimiak MP, Matentzoglu N, et al. Structured prompt interrogation and recursive extraction of semantics (SPIRES): A method for populating knowledge bases using zero-shot learning. arXiv publication:http://arxiv.org/abs/2304.02711AcknowledgementsThis project is part of theMonarch Initiative. We also gratefully acknowledgeBosch Researchfor their support of this research project.
Package: ontogram
OntogramAn OWL ontology diagram generator.Currently it supportsowl:class,rdfs:subClassOf,owl:equivalentClass, datatype properties and domain and range relationships. I am planning to add support forowl:subClassOfrestrictions soon.Example outputThe output ofexamples/tern-org.ttl.InstallationInstall via PyPI for Python 3.pip3 install ontogramUsageCommand line application$ ontogram --help

Usage: ontogram [OPTIONS] ONTOLOGY_FILEPATH

  Ontogram CLI is a tool to generate a diagram from an OWL ontology file.

Options:
  --format ['turtle', 'xml', 'nt', 'n3']
                                  RDF serialization of input file. Default is
                                  turtle.
  --help                          Show this message and exit.Use Ontogram's CLI to generate diagrams of an OWL ontology.ontogram ontology.ttlOutput will be 3 files,ontology.ttl.txt,ontology.ttl.png,ontology.ttl.svg.Use the --format option to specify the RDF serialization of the ontology if it is not Turtle.Python libraryOntogram is a Python library and can be easily integrated with any existing Python application.fromontogramimportOntogram# First parameter accepts a file path to the OWL ontology.# Second parameter tells Ontogram what RDF format the OWL ontology is in.ontogram=Ontogram('ontology.ttl',format='turtle')# Generate a PNG diagram from the OWl ontology and write to disk as 'ontology.ttl.txt'.ontogram.png_file('ontology.ttl.txt')# Same as above, but as an SVG diagram.ontogram.svg_file('ontology.ttl.svg')See theexamplesdirectory for example outputs.
Package: ontology2transmart
This package contains a mapper that reads ontologies fromDIMDI(Deutsche Institut für Medizinische Dokumentation und Information)
and translates them to the data model of theTranSMARTplatform,
an open source data sharing and analytics platform for translational biomedical research.It also provides a utility that applies the mapper and writes the translated data to tab-separated files
that can be loaded into a TranSMART database using thetransmart-copytool.⚠️ Note: this is a very preliminary version, still under development.
Issues can be reported athttps://github.com/thehyve/python_ontology2transmart/issues.InstallationThe package requires Python 3.6.To installontology2transmart, do:pipinstallontology2transmartOr from source:gitclonehttps://github.com/thehyve/python_ontology2transmart.gitcdpython_ontology2transmartpipinstall.Run tests (including coverage) with:pythonsetup.pytestUsageRead ontology from a collection of TSV files fromDIMDIand write the output in transmart-copy
format to/path/to/output. The output directory should be
empty of not existing (then it will be created).ontology2transmart<system><chapters><groups><codes>/path/to/outputParameters:system:Unique identifier for the ontologychapters:Semicolon-separated file with chaptersgroups:Semicolon-separated file with groupscodes:Semicolon-separated file with codes/path/to/output:Output directoryExample: the ICD-10-GM (German modification of ICD-10) is available aticd10gm2019syst-meta.zip.# Unzip and navigate to the classification directorymkdiricd10gm2019cdicd10gm2019unzip../icd10gm2019syst-meta.zipcdKlassifikationsdateien# create an output directorymkdiroutput# apply the mappingontology2transmarthttp://dimdi.de/icd10gm2019icd10gm2019syst_kapitel.txticd10gm2019syst_gruppen.txticd10gm2019syst_kodes.txtoutputThis generates the directoriesi2b2metadataandi2b2demodatain theoutputdirectory.
The generated data can be loaded usingtransmart-copy:#Downloadtransmart-copy:curl -f -L https://repo.thehyve.nl/service/local/repositories/releases/content/org/transmartproject/transmart-copy/17.1-HYVE-5.9-RC3/transmart-copy-17.1-HYVE-5.9-RC3.jar -o transmart-copy.jar#LoaddataPGUSER=tm_cz PGPASSWORD=tm_cz java -jar transmart-copy.jar -d outputAcknowledgementThis project was funded by the German Ministry of Education and Research (BMBF) as part of the project
DIFUTURE - Data Integration for Future Medicine within the German Medical Informatics Initiative (grant no. 01ZZ1804D).LicenseCopyright (c) 2019 The Hyve B.V.The ontology to TranSMART loader is licensed under the MIT License. See the fileLICENSE.
Package: ontology-ddxf-crypto
Ontology DDXF Cryptography ComponentsEnglish |中文1. Ontology Distributed Identity Framework (ONT ID)2. Encryption Service Based on ONT ID2.1. Encryption Process2.2. Decryption Process3. Password-Based Key Derivation Function (PBKDF)4. Elliptic Curve Integrated Encryption Scheme (ECIES)1. Ontology Distributed Identity Framework (ONT ID)Ontology DID (also called ONT ID) is a decentralized identity identification protocol based on W3C DID specifications. ONT ID establishes a cryptographically-based digital identity for each entity, allowing self-sovereign of data authorization and ownership confirmation, which makes the identity and data truly assets that the user can control.If you are interested in ONT ID, you can find a detailed introductionhere.2. Encryption Service Based on ONT ID2.1. Encryption ProcessThere are three main steps to encrypting data:Query public key: Access the smart contract in the ontology blockchain and get the corresponding public keypkbased on the data requester'sONT ID.Random sampling: Randomly sample 256-bit data to obtain the Advanced Encryption Standard (AES) keykey.Encryption: The AES256 key is encrypted using the Public Key Encryption Algorithm (PKE) to getekey, and the plaintext datamis encrypted using AES256-GCM to get the ciphertext datac.2.2. Decryption ProcessQuery private key: Find the corresponding private keyskfrom the private key management module according toONT IDandPKIndex.Decrypt symmetric key: Use the private keyskto decrypt the encrypted keyekeyto get the AES symmetric keykey.Decrypt data: Use the AES symmetric keykeyto decrypt the ciphertext datacto get the plaintext datam.3. Password-Based Key Derivation Function (PBKDF)In cryptography, PBKDF (Password-Based Key Derivation Function) is key derivation functions with a sliding computational cost, aimed to reduce the vulnerability of encrypted keys to brute force attacks.In Distributed Data eXchange Framework(short for DDXF), the hash function used by the key derivation algorithm isSHA256, and algorithm is as follows:Input:seed, derived key lengthdkLen(in bits).Output: Derived keykeyof lengthdklen.defpbkdf2(seed:strorbytes,dk_len:int)->bytes:key=b''index=1bytes_seed=str_to_bytes(seed)whilelen(key)<dk_len:key+=sha256(b''.join([bytes_seed,int_to_little_bytes(index)]))index+=1returnkey[:dk_len]4. Elliptic Curve Integrated Encryption Scheme (ECIES)Elliptic Curve Integrated Encryption Scheme(also ECIES), is a hybrid encryption system proposed by Victor Shoup in 2001. Shoup's submission can be found athere.
Package: ontology-python-sdk
Ontology Python SDKOfficial Python implementation of the Ontology SDK.InstallationInstallation requires aPython 3.6or later environment.pipinstallontology-python-sdkDocumentationRead a beautiful, responsive API documentation inhere.LicenseThe Ontology library (i.e. all code outside of the cmd directory) is licensed under the GNU Lesser General Public License v3.0, also included in our repository in the License file.
Package: ontologysim
Ontologysim: a Owlready2 library for applied production simulationOntologysim is an open-source deep production simulation framework, with an emphasis on modularized flexible library design and straightforward usability for applications in research and practice. Ontologysim is built on top of Owlready2 framework and requires Python >3.7.Ontologysim follows a set of high-level design choices which differentiate it from other similar libraries:the simulation can be saved at any time and started from a defined pointhigh degrees of freedom and possibilities due to the ontologyTable of ContentsInstallationFirst StartFlaskInstallationpipA stable version of Production simulation is periodically updated on pyPi and installed as follows:pipinstallontologysimgithubA stable version of Production simulation is periodically updated on the master and installed as follows:gitclonehttps://github.com/larsKiefer/ontologysimcdontologysim
pip3install-rrequirements.txtFirst StartGo to the/example/Main.pyand run this python file.Flaskto start the Flask server run:pyontologysim/Flask/FlaskMain.pyProblem handlingOwlready2.0Java Pathto use owlready correctly, your java path needs to be set in theowl_config.iniowl introductionJava Memoryif this error occursowlready2.base.OwlReadyJavaError:Javaerrormessageis:
ErroroccurredduringinitializationofVM
Couldnotreserveenoughspacefor2048000KBobjectheapthen you need to reduce the java memorygot to "site-packages\owlready2\reasoning.py"reduce the Java Memory variable to 500How to check if everything worksrun in the example folder theMain.py
Package: ontolopy
Ontolopya python package for working with .obo files:construction: This package is in development :construction:Please seethe docsfor the most up-to-date information:
You can access versioned docs at/versions/{version}like thisInstallationOntolopy is available on pip, and can be installed using:pipinstallontolopyUsageExample usage:importontolopy# read an ontology in obo formatobo=ontolopy.Obo('path_to_file/uberon_ext.obo')# find relationships between terms of interest:# (in this case, are any of the source_terms, is_a or part_of the brain?)source_terms=['UBERON:0003290','UBERON:0003369','UBERON:0003703']target_terms=['UBERON:0000955']#  brain termrelations_of_interest=['is_a','part_of']relations=ontolopy.Relations(source_terms,target_terms,relations_of_interest,obo.ont).relations
Package: onto-merger
Documentation|External ResourcesOntoMergeris an ontology alignment library fordeduplicatingknowledge
graph nodes,(i.e. ontology concepts) that represent thesame domain, e.g. diseases,
andconnectingthem to form a single directed acyclic hierarchical graph (DAG) (i.e. an ontology
class hierarchy).  The library implements a pipeline that takesnodes, mappings and
(disconnected) hierarchiesas input and producesnode mergesand aconnected hierarchy.
It also provides analysis and data testing for fine tuning the inputs in order
to further reduce duplication, as well as to increase connectivity.CitingIf you findOntoMergeruseful in your work or research, please consider adding the following citation:@article{ontomerger,arxivId={???},author={Geleta, David and Nikolov, Andriy and O'Donoghue, Mark and Rozemberczki, Benedekand Gogleva, Anna and Tamma, Valentina and Payne, Terry R.},month={june},title={{OntoMerger: An Ontology Integration Library for Deduplicating and Connecting Knowledge Graph Nodes.}},url={https://arxiv.org/abs/2206.02238},year={2022}}Getting StartedThe API ofonto_merger...fromonto_merger.pipelineimportPipeline# initialise the pipelinepipeline=Pipeline(project_folder_path="../path/to/project")# run the processpipeline.run_alignment_and_connection_process()# view results in "../path/to/project/output/report/index.html"Running tests$ tox -e pyLicenseApache 2.0 LicenseCreditTheOnto Mergerlogo is based on:Galguna FontNoun Project Icons
Package: ontonotes-5-parsing
A simple parser of the famous Ontonotes 5 datasethttps://catalog.ldc.upenn.edu/LDC2013T19This dataset is very useful for experiments with NER, i.e. Named Entity
Recognition. Besides, Ontonotes 5 includes three languages (English,
Arabic, and Chinese), and this fact increases interest to use it in
experiments with multi-lingual NER. But the source format of Ontonotes 5
is very intricate, in my view. Conformably, the goal of this project is
the creation of a special parser to transform Ontonotes 5 into a simple
JSON format. In this format, each annotated sentence is represented as
a dictionary with five keys: text, morphology, syntax, entities, and
language. In their’s turn, morphology, syntax, and entities are
specified as dictionaries too, where each dictionary describes labels
(part-of-speech labels, syntactical tags, or entity classes) and their
bounds in the corresponded text.You can read more detailed information about this Ontonotes 5 parser
in the small documentationhttps://github.com/nsu-ai/ontonotes-5-parsing/blob/master/readme.md
Package: on-tools
Opportunity Network Python HelpersInstallationpip install on-toolsAvailable toolsHipchat messageSends a hipchat message to selected channel.$ hipon.py room_id “This is a message @all”$ hipon.py -h
usage: hipon.py [-h] roomid messagepositional arguments:roomid
messageoptional arguments:-h,--helpshow this help message and exitWhereroom_idis your integer room id.Check migrationsValidates Django project against duplicated migrations number (useful for
med - big size projects with CI).$ check_migrations.py -h
usage: check_migrations.py [-h] [–strict] [-x exclude] dirFind duplicated Django South migrations.positional arguments:dir                   directoryoptional arguments:-h,--helpshow this help message and exit--strictexit with error code when first duplicated migration
found-xexclude,--excludeexcludeexclude patternDevault ClientGet a latest deployed version on a provided environment.$ devault.py -husage: devault.py [-h] command [options]positional arguments:command
optionsoptional arguments:-h,--helpshow this help message and exit$ devault.py gv production4.14
Package: ontopia-py
ontopia-pyThis python package helps in create and implements anOntoPiARDF.How it worksFor example, to create a street toponym in the ANNCSU dataset:fromrdflibimportXSD,Graph,Literal,Namespacefromontopia_pyimportConceptScheme,createGraphfromontopia_py.clvimportStreetToponym# Set namespace for dataANNCSU:Namespace=Namespace("https://w3id.org/sona/data/ANNCSU/")# Create the graph and bind the namespaceg=createGraph()g.bind("anncsu",ANNCSU)# Create the concept schemeANNCSU_DATA:ConceptScheme=ConceptScheme(ANNCSU)ANNCSU_DATA.label=[Literal("Anagrafe nazionale numeri civici e strade urbane",lang="it"),Literal("Civic Addressing and Street Naming",lang="en")]# Add to graphANNCSU_DATA.addToGraph(g)# Create the street toponymstreetToponym:StreetToponym=StreetToponym(id="street-1",baseUri=ANNCSU,dataset=ANNCSU_DATA,titles=[Literal("Via Roma",datatype=XSD.string)])streetToponym.toponymQualifier="Via"streetToponym.officialStreetName="Roma"# Add to graphstreetToponym.addToGraph(g)Ontologies implementedhttps://w3id.org/italia/onto/ACCOhttps://w3id.org/italia/onto/AccessConditionhttps://w3id.org/italia/onto/AtlasOfPathshttps://w3id.org/italia/onto/CLVhttps://w3id.org/italia/onto/COVhttps://w3id.org/italia/onto/CPEVhttps://w3id.org/italia/onto/CPSVhttps://w3id.org/italia/onto/CPVhttps://w3id.org/italia/onto/CulturalHeritagehttp://dati.beniculturali.it/cishttps://w3id.org/italia/onto/HERhttps://w3id.org/italia/onto/Indicatorhttps://w3id.org/italia/onto/IoThttps://w3id.org/italia/onto/Languagehttps://w3id.org/italia/onto/MUhttps://w3id.org/italia/onto/PARKhttps://w3id.org/italia/onto/POIhttps://w3id.org/italia/onto/POThttps://w3id.org/italia/onto/Projecthttps://w3id.org/italia/onto/PublicContracthttps://w3id.org/italia/onto/ROhttps://w3id.org/italia/onto/Routehttps://w3id.org/italia/onto/SMhttps://w3id.org/italia/onto/TIhttps://w3id.org/italia/onto/Transparencyhttps://w3id.org/italia/onto/l0
Package: ontopic
Example workflowLoad ontologyvia github link or local directoryimportontopicsasotonthology=ot.load_onthology("https://github.com/OpenCS-ontology/OpenCS")# oronthology=ot.load_onthology("onthologies/OpenCS",objects="",descriptions="")Prepare topics for classification# topics is atopics=onthology.prepare_topics()Classify text to ontologiesfromontopic.modelsimportTopicalClassifiertext="In this paper we introduce novel NLP NER machine learning model"model=TopicalClassifier()# to get top 10 topics, 5 is by defaulttopics=model.predict(text,top=10)# to get topics which are above given threshold of 'probability'topics=model.predict(text,threshold=0.2)# to get topics and also probabilitiestopics,proba=model.predict(text,proba=True)