Skip to main content

No project description provided

Project description

A python package that has classes that processes text and creates a rag chef chat agent that gives cooking tips and recipes.

How to install

pip install lyser

A class to perform text analysis on a given corpus.

    Attributes:
        corpus (str): The corpus to analyze.
        
    Methods:
        pipeline(): A function to perform text analysis on a given corpus.
        Returns a list of tokens.
        e.g. ['the', 'cat', 'sat', 'on', 'the', 'mat']
        
        pos_tagging(): A function to perform POS tagging on a given corpus.
        Returns a list of tuples containing the word and its POS tag.
        e.g. [('the', 'DT'), ('cat', 'NN'), ('sat', 'VB'), ('on', 'IN'), ('the', 'DT'), ('mat', 'NN')]
        
        visualize_word_cloud(): A function to visualize the word cloud of a given corpus.
        
    Example:
        analyzer = TextAnalyzer(corpus=sample_text)
        analyzer.pipeline()
        analyzer.pos_tagging()
        analyzer.visualize_word_cloud()

A class to invoke Chef Chat

    Attributes:
        folder_path (str, pdf): path to folder_path with recipe files
        query (str): user input
        

        
    Methods:
        data_loader(): A function that loads the pdf books in a folder and returns a list of documents.
        Returns:
            list: A list of documents. Each document is a dictionary with a 'page_content' key and 'metadata' key.
        
        chat_summary():  A function that creates a chat summary 
        Returns:
            chat_memory: A AgentTokenBufferMemory chat summary memory.

        
        rag_agent(): A function that creates a rag agent that returns recipes of meals from cook pdf books 
        Returns:
            agent_result: A dictionary with the output of the rag agent.
        
        
    Example:
        # chef_chat = ChefChat(folder_path="data", query="How can i make pineapple chicken")
        print(chef_chat.rag_agent())

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

lyser-1.3.tar.gz (4.1 kB view details)

Uploaded Source

File details

Details for the file lyser-1.3.tar.gz.

File metadata

  • Download URL: lyser-1.3.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for lyser-1.3.tar.gz
Algorithm Hash digest
SHA256 638920fad0a062b7a432d425145348cd466bc08e28c3325437dff08e3a1a3a6c
MD5 10b65c57f5a9b5ce950ace30a5b48106
BLAKE2b-256 66f13a28a6534caa26d61c55876722e3d6bd4d76576b7117abdd5f6ca3a1eaf5

See more details on using hashes here.

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