|
1 | | -# 🍱 Semantic Chunking Web UI |
2 | | - |
3 | | -A web-based interface for experimenting with and tuning Semantic Chunking settings. This tool provides a visual way to test and configure the `semantic-chunking` library's settings to get optimal results for your specific use case. Once you've found the best settings, you can generate code to implement them in your project. |
4 | | - |
5 | | -## Features |
6 | | - |
7 | | -- Real-time text chunking with live preview |
8 | | -- Interactive controls for all chunking parameters |
9 | | -- Visual feedback for similarity thresholds |
10 | | -- Model selection and configuration |
11 | | -- Results download in JSON format |
12 | | -- Code generation for your settings |
13 | | -- Example texts for testing |
14 | | -- Dark mode interface |
15 | | -- Syntax highlighting of JSON results and code samples |
16 | | -- Line wrapping toggle for JSON results |
17 | | - |
18 | | - |
19 | | - |
20 | | -## Getting Started |
21 | | - |
22 | | -### Prerequisites |
23 | | -- Node.js (v18 or higher recommended) |
24 | | -- npm (comes with Node.js) |
25 | | - |
26 | | -### Installation |
27 | | - |
28 | | -1. Clone the repository: |
29 | | -```bash |
30 | | -git clone https://github.com/jparkerweb/semantic-chunking.git |
31 | | -``` |
32 | | - |
33 | | -2. Navigate to the webui directory: |
34 | | -```bash |
35 | | -cd semantic-chunking/webui |
36 | | -``` |
37 | | - |
38 | | -3. Install dependencies: |
39 | | -```bash |
40 | | -npm install |
41 | | -``` |
42 | | - |
43 | | -4. Start the server: |
44 | | -```bash |
45 | | -npm start |
46 | | -``` |
47 | | - |
48 | | -5. Open your browser and visit: |
49 | | -```bash |
50 | | -http://localhost:3000 |
51 | | -``` |
52 | | - |
53 | | -## Usage |
54 | | - |
55 | | -### Basic Controls |
56 | | - |
57 | | -- **Document Name**: Name for your input text |
58 | | -- **Text to Chunk**: Your input text to be processed |
59 | | -- **Max Token Size**: Maximum size for each chunk (50-2500 tokens) |
60 | | -- **Similarity Threshold**: Base threshold for semantic similarity (0.1-1.0) |
61 | | -- **Similarity Sentences Lookahead**: Number of sentences to look ahead when calculating similarity (1-10) |
62 | | - |
63 | | -### Advanced Settings |
64 | | - |
65 | | -- **Dynamic Threshold Bounds**: Lower and upper bounds for dynamic similarity threshold adjustment |
66 | | -- **Combine Chunks**: Enable/disable chunk combination phase |
67 | | -- **Combine Chunks Similarity Threshold**: Threshold for combining similar chunks |
68 | | - |
69 | | -### Model Settings |
70 | | - |
71 | | -- **Embedding Model**: Choose from various supported embedding models |
72 | | -- **Quantized Model**: Toggle model quantization for reduced memory usage |
73 | | - |
74 | | -### Output Settings |
75 | | - |
76 | | -- **Return Token Length**: Include token count in results |
77 | | -- **Return Embedding**: Include embeddings in results |
78 | | -- **Chunk Prefix**: Add prefix to chunks (useful for RAG applications) |
79 | | -- **Exclude Chunk Prefix in Results**: Remove prefix from final results |
80 | | - |
81 | | -### Example Texts |
82 | | - |
83 | | -Use the provided example texts to test different scenarios: |
84 | | -- `similar.txt`: Text with high semantic similarity between sentences |
85 | | -- `different.txt`: Text with low semantic similarity between sentences |
86 | | - |
87 | | -### Results |
88 | | - |
89 | | -- View chunked results in real-time |
90 | | -- See chunk count, average token length, and processing time |
91 | | -- Download results as JSON |
92 | | -- Get generated code with your current settings |
93 | | - |
94 | | -## Development |
95 | | - |
96 | | -The web UI is built with: |
97 | | -- `semantic-chunking` library for text processing |
98 | | -- Express.js for the backend |
99 | | -- Vanilla JavaScript (ES6+) for the frontend |
100 | | -- CSS3 for styling |
101 | | - |
102 | | -## License |
103 | | - |
104 | | -This project is licensed under the MIT License - see the LICENSE file for details. |
105 | | - |
106 | | -## Appreciation |
107 | | - |
108 | | -If you enjoy this package please consider sending me a tip to support my work 😀 |
109 | | -# [🍵 tip me here](https://ko-fi.com/jparkerweb) |
| 1 | +# 🍱 Semantic Chunking Web UI |
| 2 | + |
| 3 | +A web-based interface for experimenting with and tuning Semantic Chunking settings. This tool provides a visual way to test and configure the `semantic-chunking` library's settings to get optimal results for your specific use case. Once you've found the best settings, you can generate code to implement them in your project. |
| 4 | + |
| 5 | +## Features |
| 6 | + |
| 7 | +- Real-time text chunking with live preview |
| 8 | +- Interactive controls for all chunking parameters |
| 9 | +- Visual feedback for similarity thresholds |
| 10 | +- Model selection and configuration |
| 11 | +- Results download in JSON format |
| 12 | +- Code generation for your settings |
| 13 | +- Example texts for testing |
| 14 | +- Dark mode interface |
| 15 | +- Syntax highlighting of JSON results and code samples |
| 16 | +- Line wrapping toggle for JSON results |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | +## Getting Started |
| 21 | + |
| 22 | +### Prerequisites |
| 23 | +- Node.js (v18 or higher recommended) |
| 24 | +- npm (comes with Node.js) |
| 25 | + |
| 26 | +### Installation |
| 27 | + |
| 28 | +1. Clone the repository: |
| 29 | +```bash |
| 30 | +git clone https://github.com/jparkerweb/semantic-chunking.git |
| 31 | +``` |
| 32 | + |
| 33 | +2. Navigate to the webui directory: |
| 34 | +```bash |
| 35 | +cd semantic-chunking/webui |
| 36 | +``` |
| 37 | + |
| 38 | +3. Install dependencies: |
| 39 | +```bash |
| 40 | +npm install |
| 41 | +``` |
| 42 | + |
| 43 | +4. Start the server: |
| 44 | +```bash |
| 45 | +npm start |
| 46 | +``` |
| 47 | + |
| 48 | +5. Open your browser and visit: |
| 49 | +```bash |
| 50 | +http://localhost:3000 |
| 51 | +``` |
| 52 | + |
| 53 | +## Usage |
| 54 | + |
| 55 | +### Basic Controls |
| 56 | + |
| 57 | +- **Document Name**: Name for your input text |
| 58 | +- **Text to Chunk**: Your input text to be processed |
| 59 | +- **Max Token Size**: Maximum size for each chunk (50-2500 tokens) |
| 60 | +- **Similarity Threshold**: Base threshold for semantic similarity (0.1-1.0) |
| 61 | +- **Similarity Sentences Lookahead**: Number of sentences to look ahead when calculating similarity (1-10) |
| 62 | + |
| 63 | +### Advanced Settings |
| 64 | + |
| 65 | +- **Dynamic Threshold Bounds**: Lower and upper bounds for dynamic similarity threshold adjustment |
| 66 | +- **Combine Chunks**: Enable/disable chunk combination phase |
| 67 | +- **Combine Chunks Similarity Threshold**: Threshold for combining similar chunks |
| 68 | + |
| 69 | +### Model Settings |
| 70 | + |
| 71 | +- **Embedding Model**: Choose from various supported embedding models |
| 72 | +- **DType**: Select the data type for the model, affecting precision and performance (e.g., `fp32`, `fp16`, `q8`). |
| 73 | +- **Device**: Choose the processing device (`cpu` or `webgpu`). |
| 74 | + |
| 75 | +### Output Settings |
| 76 | + |
| 77 | +- **Return Token Length**: Include token count in results |
| 78 | +- **Return Embedding**: Include embeddings in results |
| 79 | +- **Chunk Prefix**: Add prefix to chunks (useful for RAG applications) |
| 80 | +- **Exclude Chunk Prefix in Results**: Remove prefix from final results |
| 81 | + |
| 82 | +### Example Texts |
| 83 | + |
| 84 | +Use the provided example texts to test different scenarios: |
| 85 | +- `similar.txt`: Text with high semantic similarity between sentences |
| 86 | +- `different.txt`: Text with low semantic similarity between sentences |
| 87 | + |
| 88 | +### Results |
| 89 | + |
| 90 | +- View chunked results in real-time |
| 91 | +- See chunk count, average token length, and processing time |
| 92 | +- Download results as JSON |
| 93 | +- Get generated code with your current settings |
| 94 | + |
| 95 | +## Development |
| 96 | + |
| 97 | +The web UI is built with: |
| 98 | +- `semantic-chunking` library for text processing |
| 99 | +- Express.js for the backend |
| 100 | +- Vanilla JavaScript (ES6+) for the frontend |
| 101 | +- CSS3 for styling |
| 102 | + |
| 103 | +## License |
| 104 | + |
| 105 | +This project is licensed under the MIT License - see the LICENSE file for details. |
| 106 | + |
| 107 | +## Appreciation |
| 108 | + |
| 109 | +If you enjoy this package please consider sending me a tip to support my work 😀 |
| 110 | +# [🍵 tip me here](https://ko-fi.com/jparkerweb) |
0 commit comments