Skip to content

Design and Architecture

2024-03-10

The custom mode in word-guru

The custom mode allows users to create commands in the CLI using a configuration file.

command_name="correct-markdow-text"
prompt="""
Je vais te donner un dialogue écrite en markdown. Je veux que tu donnes un
titre à la histoire et me l'expiique. En particulier, je veux que tu prenne
soin de préciser la signification de toutes les termes qui sont entourées par
**. C'est très important de me donner la réponse formaté avec le code markdown.
"""
input=["text"]

2024-03-08

word-guru

I am going to integrate the chatgpt-dictionary in the word-guru package. The idea is to start with three modes in word-guru:

  1. dictionary
  2. copywriter
  3. teacher

Dictionary

  • get-definition
  • get-synonyme
  • get-reverse-definition
  • get-usage-examples
  • get-pos-tag
  • get-thesaurus

Copywriter

  • get-summary
  • explain-text (in 2,4,8 sentences)
  • get-alternative-expressions
  • rewrite-text (friendly, formal, business tone)
  • correct-text

Teacher

  • why-this-and-not-that

Phrase generator + text correction

This is a product which will have these two features:

  1. Theme generator
  2. Text correction

For this tool to work I need:

  • Dictionary: all
  • Copywriter: correct-text.

Theme generator

From a thesaurus grouped by categories such as in the book les mots de l'écrivain I am going to create templates of sentences that will be distributed as inspirations for stories. Then, the user will eventually write a story about the theme and then can use our corrector to find mistakes and how it could be improved.

Text corrector

In a first moment, it will simply identify typos and accordance mistakes. We should be able to correct texts from images, pdf and text. The killer feature should be the presentation that should be easy and clear to follow.

2024-02-03

word-def

This package is responsible to collect word-def plugins modules that are installed in the environment and use their common api defined at word-def-plugin-core to make use of the different dictionaries.

word-def-plugin-core

This package defines the common interface between word-def and a word-def plugin.

word-def-plugin-english-collins

This package is a word-def plugin that uses the collins-dictionary-api-client to implement the interface defined at word-def-plugin-core.

collins-dictionary-api-client

This package contains an api and a client to the Collins Dictionary API.

2024-01-04

  • Word Definition: I am going to reduce the scope of Dictionary Actions. Its main purpose is to get the definition of words in any language. To reflect that, I am also going to change the name of the package to Word Definition.
  • Plugin Architecture: The Word Definition package is composed of language modules. Each module implements the word definition interface. Language modules are installed separately.

Organization

  • danoan.word_def.core.(api, model, utils)
  • danoan.word_def.plugins(english,italian...)
  • danoan.word_def.cli

2024-01-03

  • One module for each dictionary: The modules are independent and do not follow any particular interface. The idea is that they can be used as standalone programs. For example, the collins-api it will be a package itself with its own cli.py
  • Dictionary Actions: This package will implement adapters, one for each independent dictionary API. These adapters will follow a unique interface, defined by the dictionary-action package itself. The dictionary-action package will consume the dictionary-api's through their adapters.