https://github.com/vovandreevik/cross-reference-generator
This C++ program reads text from a file, generates a cross-reference table of words along with the lines they appear on, and prints the text with line numbers.
https://github.com/vovandreevik/cross-reference-generator
cpp cross-reference dictionary map vector
Last synced: about 1 year ago
JSON representation
This C++ program reads text from a file, generates a cross-reference table of words along with the lines they appear on, and prints the text with line numbers.
- Host: GitHub
- URL: https://github.com/vovandreevik/cross-reference-generator
- Owner: vovandreevik
- Created: 2023-05-26T14:14:52.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-10-26T20:18:31.000Z (over 2 years ago)
- Last Synced: 2025-02-13T14:49:44.027Z (over 1 year ago)
- Topics: cpp, cross-reference, dictionary, map, vector
- Language: C++
- Homepage:
- Size: 12.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Text Cross-Reference Generator
This C++ program reads text from a file, generates a cross-reference table of words along with the lines they appear on, and prints the text with line numbers.
It's a useful tool for quick word and line references in a text document.
## Features
- **Text with Line Numbers**: Displays the original text with line numbers, making it easier to reference specific lines.
- **Cross-Reference Table**: Generates a cross-reference table of words and the lines they appear on.
- **Word Cleaning**: Cleans words by removing non-alphabetic characters and converting them to lowercase for accurate word counts.
## Input File Format
The input file should contain the text you want to process. The program reads and analyzes this text.
### Example Input File:
```
cherry tree tree
Cherry;
mango cherry tree,
apple. %^**(@#
free 324235
```
## Examples
Example command and expected output:
### Text with Line Numbers:
```
1: cherry tree tree
2: Cherry;
3: mango cherry tree,
4: apple. %^**(@#
5: free 324235
```
### Cross-Reference Table:
```
Words: Lines:
apple 4
cherry 1 2 3
free 5
mango 3
tree 1 3
```