Coder Social home page Coder Social logo

heristop / gutenku Goto Github PK

View Code? Open in Web Editor NEW
11.0 3.0 0.0 406.02 MB

🌸 A Haiku generator using Project Gutenberg and AI πŸ—»

Home Page: https://gutenku.xyz

License: GNU General Public License v3.0

JavaScript 2.41% Python 8.68% TypeScript 62.14% HTML 0.99% Vue 23.82% SCSS 1.10% CSS 0.29% Shell 0.58%
poem-generator vue3 haiku-generator natural-language markov-chain gutenberg-project gpt-4-api apollo-server dalle-3

gutenku's Introduction

GutenKu

🌸 Daily Haiku Card πŸ—»

Daily Haiku Card

Last Snapshot: Wed, 21 Aug 2024 00:00:01 +0000

πŸ‘©β€πŸ« β€œThis haiku captures a moment of introspection and the appreciation of beauty beyond words. The first line, 'I don't want words,' suggests a desire for an experience or understanding that transcends verbal expression. The second line, 'He asked me to study it,' introduces an external prompt, perhaps from a teacher or mentor, urging the speaker to engage with something deeply. The final line, 'It's beautiful,' reveals the outcome of this engagementβ€”a realization of beauty that doesn't need to be articulated. The haiku emphasizes the power of silent observation and the profound impact of personal discovery.”

πŸ€–βœ’οΈ Analysis Written by BotenKu, Your devoted Bot Literature Teacher

Want more? Visit πŸ”—gutenku.xyz or come back tomorrow πŸ˜‰


Description

GutenKu is a creative, literature-inspired project that uses Natural Language Processing (NLP), Markov Chain algorithms, Vue.js, and MongoDB to generate haiku poetry. The project scrapes selected text data from Project Gutenberg, a vast online library of free eBooks. This data is then processed to extract quotes, generate unique haiku, and offer sentiment analysis of the created poems. Furthermore, GutenKu employs OpenAI to improve selection and provide descriptions for each haiku. Ultimately, the application generates images of the haikus.

Preview

How it works

GutenKu operates by leveraging Python to scrape textual data from a curated whitelist of eBooks on Project Gutenberg. This gathered data is then processed through a Markov Chain, a probabilistic model that transitions from one state to another based on defined rules. The model is employed to identify and sequence sentences with the highest transition probabilities.

Once sentences are generated, Natural Language Processing (NLP) techniques come into play. These techniques disassemble sentences into words, conduct sentiment analysis, and enforce the traditional 5-7-5 syllable structure of a haiku. The syllable counting is facilitated by the syllable library.

The processed chapters are stored in a MongoDB database, along with the generated haikus, improving the application's performance with a cache system based on TTL principles. GutenKu also incorporates OpenAI api to enhance haiku selection and to generate descriptive narratives for each haiku. In the final stage, the application creates ready-to-post images of the haikus.

The user-facing side of the application is powered by Vue.js 3, providing an interactive interface that not only displays the generated haikus. It also offers an advanced mode for more personalized and unique results.

API Endpoint

GutenKu provides a GraphQL API for interacting with the service. The server is built using Apollo Server, a community-driven, open-source GraphQL server that works with any GraphQL schema.

Ecosystem

Api Vue

Application Env
Api TypeScript, GraphQL / Apollo Server, MongoDB, Python, OpenAI 4
Front TypeScript, GraphQL / Apollo Client, Vue 3 / Vuetify 3 / Pinia, Cypress.io

Acknowledgments

Thanks to the creators and maintainers of Project Gutenberg for providing the texts


GutenKu Logo

Β© 2023 heristop / @gutenku.poem. All rights reserved.

gutenku's People

Contributors

dependabot[bot] avatar heristop avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gutenku's Issues

local repo setup issue

Hi,

I've been following the instructions at https://github.com/heristop/gutenku/blob/main/packages/server/README.md, but when I run docker-compose up -d i get the following error: (root) Additional property mongo-container is not allowed. When I edit the docker-compose.yaml file to include the services parameter, this goes away.
Screen Shot 2023-06-04 at 10 22 25 AM

However, now when I run docker-compose, it just gets hung up and doesn't spin up the mongo server. Any advice on how to troubleshoot/proceed?

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.