npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

danso

v1.0.10

Published

DANSO is a specialized markdown parser designed to enhance the performance of Language Models (LLMs) when processing markdown documents. It addresses the limitations of naive document processing approaches and provides a targeted solution to improve proce

Downloads

3

Readme

DANSO 🪈: Document Abstract Notation for Semantic Operations

DANSO is a specialized markdown parser designed to enhance the performance of Language Models (LLMs) when processing markdown documents. It addresses the limitations of naive document processing approaches and provides a targeted solution to improve processing quality, coherence, and fidelity to the original content.

Key Features

  • Shallow Parsing: DANSO performs a shallow parsing of markdown elements, categorizing them into frontmatter, MDX/HTML tags, code blocks, headers, and paragraphs. This allows LLMs to better understand the structure and context of the document.
  • Targeted Logic: Each type of parsed entity undergoes corresponding processing logic, ensuring that only the necessary parts are processed while preserving the structure and functionality of the document.
  • Frontmatter Handling: DANSO identifies and processes only the string values in the frontmatter, such as title and description, keeping the frontmatter structure intact.
  • MDX/HTML Tag Preservation: The parser recognizes MDX and HTML tags and processes only the inner strings, preserving the tags and their functionality.
  • Code Block Extraction: Code blocks are extracted as a whole, along with basic metadata. DANSO can optionally process code comments while keeping the code itself unmodified.
  • Paragraph Context: The raw text of each paragraph is provided as a whole, allowing LLMs to understand the context and generate more coherent outputs.

Why DANSO?

Traditional document processing approaches often face challenges when dealing with markdown documents, such as:

  • Unintentional processing of MDX tags and modification of code blocks, leading to syntax errors and altered functionality.
  • Limited context due to parsing at the HTML tag level, resulting in suboptimal outputs and difficulty in reordering sentences.
  • Improper handling of proper nouns, causing confusion and altering the intended meaning.

DANSO addresses these challenges by providing a specialized parsing approach that preserves important elements, maintains context, and applies appropriate processing strategies to different parts of the document. This leads to improved processing quality, coherence, and fidelity to the original content.

Usage

To use DANSO in your project, follow these steps:

  1. Install the DANSO package:
    npm install danso
  2. Import the DANSO parser in your code:
    import { parse } from 'danso'
  3. Parse your markdown document using DANSO:
    const parsed = parse(markdownString)
  4. Process the parsed entities according to your requirements, such as further analysis or transformation.

Contributing

We welcome contributions to DANSO! If you encounter any issues or have suggestions for improvements, please open an issue on our GitHub repository. Feel free to submit pull requests with bug fixes, enhancements, or new features.

License

DANSO is open-source software licensed under the MIT License. You are free to use, modify, and distribute the software in accordance with the terms of the license.

Acknowledgements

We would like to thank the contributors and the open-source community for their valuable input and support in developing DANSO.

Contact

For any questions or inquiries, please contact us at [email protected]


Happy parsing and processing with DANSO 🪈!

Inspired & Modified from wobsoriano/bun-lib-starter: My minimal bun library starter