Giter Club home page Giter Club logo

ttt-api's Introduction

TTT-API

This script was created for the Dialogue Systems 2 course at the University of Gothenburg in 2022.

It is a very simple script intended for extracting information about the edibility of certain plants from The Tortoise Table. It contains one function, get_plant_dict(), which returns a dictionary of plants matching the input string; each plant's value is another dictionary containing their edibility and latin name. Alternative names are not featured, nor are the details as to why the plant is edible or not. In case no match is found, the dictionary is returned empty. Input should be given in the form of a string. (Un)fortunately the search results are not up to the script, but to TTT's search algorithm.

Example input and output:

>>> import TTT_API as ttt
>>> ttt.get_plant_dict("Cherry")
{
'Laurel': {'edibility': 'Do not Feed', 'latin': 'Prunus laurocerasus'}, 
'Cherry': {'edibility': 'Feed Sparingly', 'latin': 'Prunus spp.'}, 
'Jerusalem Cherry': {'edibility': 'Do not Feed', 'latin': 'Solanum pseudocapsicum'}, 
'Chinese Lantern': {'edibility': 'Do not Feed', 'latin': 'Physalis spp.'}, 
'Heliotrope': {'edibility': 'Do not Feed', 'latin': 'Heliotropium spp.'}, 
'Bay Tree': {'edibility': 'Feed Sparingly', 'latin': 'Laurus nobilis'}
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.