An open API service indexing awesome lists of open source software.

https://github.com/jparkerweb/splitter-vs-splitter

🪓 simple app to pit two sentence splitters against one another to understand their differences
https://github.com/jparkerweb/splitter-vs-splitter

comparer npm sentence-splitting

Last synced: about 2 months ago
JSON representation

🪓 simple app to pit two sentence splitters against one another to understand their differences

Awesome Lists containing this project

README

        

# 🪓 Splitter vs Splitter

A web-based tool to compare different sentence splitting libraries side by side. Currently compares:
- [@stdlib/nlp-sentencize](https://www.npmjs.com/package/@stdlib/nlp-sentencize)
- [sentence-parse](https://www.npmjs.com/package/sentence-parse)

## Features
- Real-time sentence splitting comparison
- Visual color-coding of sentences for easy comparison
- Sentence count display
- Responsive design
- Keyboard shortcuts (Ctrl + Enter to split)

## Tech Stack
- Express.js backend
- Vanilla JavaScript frontend
- CSS3 with Flexbox
- No external UI libraries or frameworks

## Getting Started

### Prerequisites
- Node.js (v14 or higher)
- npm (v6 or higher)

### Installation
1. Clone the repository:
```bash
git clone https://github.com/yourusername/splitter-vs-splitter.git
cd splitter-vs-splitter
```

2. Install dependencies:
```bash
npm install
```

3. Create a `.env` file with the following (edit the port as needed):
```bash
cp .env.example .env
```

### Development
Run the development server with auto-reload:
```bash
npm run dev
```

### Production
Run the production server:
```bash
npm start
```

## Usage
1. Enter or paste your text in the input area
2. Click "Process Text" or press Ctrl + Enter
3. Compare the results from both libraries side by side
4. Each sentence is highlighted with a matching color in both outputs for easy comparison

## Example
![Example](./docs/example.png)