Skip to main content

Classifier interface for Whyis

Project description

whyis_classifier

Installation

  • install whyis using this command

    WHYIS_BRANCH=master bash < <(curl -skL https://raw.githubusercontent.com/tetherless-world/whyis/master/install.sh)
    
  • whyis will be installed in /apps/whyis

  • In your knowledge graph directory, add the classifier agent to the list of inferencers in your config.py file:

    • Add the following import line: import whyis_classifier.classifier_agent as cl
    • Add the following line to the inferencers item in the Config dictionary constructor: "Classifier": cl.Classifier()
  • Write your own classifier, using whyisclassifier.WhyisClassifier as its base class

    • You must provide your own identifier (an rdflib.URIRef) and write a label() method
  • Locate your whyis_classifier installation, and in the file user_classifiers.py, import your classifier and add it to the user_classifiers dictionary in the form 'my_classifier_name': my_file.MyClassifier()

    • To locate your whyis_classifier installation, run python -c "import whyis_classifier as _; print(_.__path__[0])"
  • Reload your knowledge graph to run the inferencer over it

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

whyis_classifier-0.0.1.tar.gz (5.4 kB view hashes)

Uploaded Source

Built Distribution

whyis_classifier-0.0.1-py3-none-any.whl (7.2 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