Quick Start Guide¶
TNH Scholar provides powerful text processing capabilities through several command-line tools. This guide will help you get started with the basic workflows.
Initial Setup¶
After installation, run the setup tool:
This creates necessary directories and downloads default prompts.
Core Tools¶
TNH Scholar includes several specialized tools:
tnh-fab (Deprecated - Migrating to tnh-gen)¶
⚠️ Note:
tnh-fabis deprecated and will be replaced bytnh-gen. The tool remains functional with a deprecation warning.
The main text processing tool, providing functions for:
- Text punctuation and formatting
- Section analysis
- Translation
- Prompt-based processing
Example usage:
# Add punctuation to text (deprecated command)
tnh-fab punctuate input.txt > punctuated.txt
# Translate Vietnamese text to English
tnh-fab translate -l vi input.txt > translated.txt
See TNH-Gen Architecture for the upcoming replacement tool.
audio-transcribe¶
Process and transcribe audio content:
# Transcribe from YouTube
audio-transcribe --yt_url "https://youtube.com/watch?v=example" --split --transcribe
# Process local audio
audio-transcribe -f recording.mp3 --split --transcribe
ytt-fetch¶
Download YouTube transcripts:
nfmt¶
Format text file newlines:
Common Workflows¶
Text Processing Pipeline¶
# Complete processing pipeline
cat input.txt | \
tnh-fab punctuate | \
tnh-fab section | \
tnh-fab translate -l vi | \
tnh-fab process -p format_xml > output.xml
Audio Processing¶
# Download and transcribe
audio-transcribe --yt_url "https://example.com/video" --split --transcribe
# Post-process transcription
tnh-fab punctuate transcript.txt | \
tnh-fab section > processed.txt
Next Steps¶
- Review the Prompt System documentation
- Explore detailed CLI documentation for all available tools
- Check out example notebooks in the repository