Git Product home page Git Product logo

doc2flow's Introduction

Introduction

Motivation

ToDo

The mermaid official plugin is Mermaid-Plugin. Alternatively, this project uses a naive method and RAG to generate the flowchart.

Design

ToDo

runit

source file.

Illustration

  1. English News en

  2. Chinese News ch

  3. Math Formular math

The prompt used

ToDo

Example: Test Case generation and management

Gary Parker provided an intrestring example: medium.

Here is the example:

flowchart TD
    A[Homepage] -->|Click Login| B(Login Modal)
    A -->|Click Sign up| C(Registration Page)
    C -->|Click back| A
    B -->|Enter valid username and password| D[Login Button]
    B -->|Enter incorrect details| B
    B -->|Close Modal| A
    D -->|Click Login| E[Logged in lobby]
    C -->|Enter valid details| F[Submit Button]
    C -->|Enter incorrect details| C
    F -->|Click Submit| E
    E --> G[Logout Button] -->|Click Logout| A

The tested context is:

Here's a list of possible test cases based on the provided flowchart, without the specific test steps:

Successful login with valid credentials.
Failed login with incorrect credentials.
Successful registration with valid details.
Failed registration with incorrect or incomplete details.
Successful logout from the "Logged in lobby."
Navigating from the homepage to the login modal.
Navigating from the homepage to the registration page.
Closing the login modal without attempting to log in.
Closing the registration page without submitting any details.
Closing the registration page after entering incorrect or incomplete details.
Closing the login modal after entering incorrect details.
Navigating back to the homepage from the registration page.
Navigating back to the homepage from the login modal.
Successful submission of the registration form.
Successful submission of the login form after previously failing.
Clicking the "Logout" button from the "Logged in lobby."
Navigating to the "Logged in lobby" after successful registration.
Navigating to the "Logged in lobby" after successful login.
Navigating to the "Logged in lobby" from the homepage and then logging out.
Navigating back to the homepage from the "Logged in lobby" after logging out.

Now input it into Doc2Chart:

software_pred_test

Example: Academia Study

Summarize and translate the academia paper into a mermaid map.

software_pred_test

This manuscript could be found here, or https://doi.org/10.1093/bib/bbad241. Basically, the mind-map summarizes our method in the BIB paper 😊😊😊

Example: Prompt Planner-Translator

This example explains my "Chinese-English" prompts, and works well. The following section is the result generated by Doc2Flow.

Results

I am a translator.

When the input is an English sentence, translate it into Chinese; when the input is a Chinese sentence, translate it into English. If only one word is given, provide multiple possible translations if applicable, otherwise don't include any extra words. Ensure the translation is accurate, fluent and follows common usage. Unfamiliar technical terms (especially nouns) should be left untranslated. Do not use inverted sentences or complex subordinate clauses.

Here's a summary of the process in Chinese:

中文翻译:

  • 首先判断输入是英文还是中文,根据情况进行翻译或直接返回
  • 如果输入是英文单词,提供多个可能的翻译结果
  • 确保翻译准确、流畅且符合常用表达方式
  • 对于未知的专业术语(尤其是名词),保留原文不要翻译
  • 避免使用倒装句和复杂从句

The output table would look something like this:

Step Description
1 Determine if the input is English or Chinese and translate accordingly or return the input
2 If the input is an English word, provide multiple possible translations
3 Ensure translation accuracy, fluency, and naturalness
4 Avoid using inverted sentences and complex subordinate clauses
5 Keep unfamiliar technical terms in their original language

Here's a mermaid diagram that illustrates the process:

graph LR
A[Input] --> B[Determine input type]
B --> C1[Translate English to Chinese]
B --> C2[Return or translate Chinese to English]
C1 --> D1[Provide multiple translations if applicable]
C2 --> D2[Ensure accuracy, fluency and naturalness]
D1 --> E1[Avoid inverted sentences and complex subordinate clauses]
D2 --> E2[Keep unfamiliar technical terms in their original language]

Example: Education, Timeline (Chinese)

fig06

Advanced Timeline

Multi-round QA, Translation, Styled timeline

fig07

License

Apache License Version 2.0

doc2flow's People

Contributors

yfyang86 avatar

Watchers

 avatar

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.