Helper app for SubEthaEdit's Divvun modes and system-wide text analysis services.
Current version: 1.1.1 - See version history
SubEthaEdit is sandboxed and cannot execute external binaries directly. Divvun-SEE-helper is an unsandboxed helper app that provides access to HFST/Giella tools and creates system-wide macOS Services for text analysis.
- LexC Analysis for SubEthaEdit - Analyzes words in LexC files and suggests missing lexicon entries
- Analyze Text Service - System-wide service for morphological and syntactic analysis (opens in SubEthaEdit)
- Draw Dependency Tree Service - System-wide service that visualizes dependency trees as PNG images
All features support multiple languages configured via ~/.divvun-see-helper-config.
- macOS 10.15 or newer
- Python 3.9+ (included in Xcode Command Line Tools)
- divvun-runtime - Text analysis engine
- giella-core - Must be cloned from GitHub
- Graphviz (for Draw Dependency Tree service)
brew install graphviz
- SubEthaEdit (for Analyze Text service results)
- Built analyser files (
.drb) - See Building Analysers below
make installThis copies Divvun-SEE-helper.app to ~/Applications/.
First-time use: Right-click the app and choose "Open" to approve it (macOS security requirement).
make install-serviceThis installs two Quick Actions:
- Analyze Text - Shows morphological/syntactic analysis
- Draw Dependency Tree - Creates visual dependency graph
Services appear in the Services menu when text is selected in any application.
make uninstall # Remove helper app
make uninstall-service # Remove servicesCreate ~/.divvun-see-helper-config:
# Default language for analysis (ISO 639-3 code)
export DEFAULT_ANALYSIS_LANG="sme"
# Path to giellalt root directory (not language-specific)
export GTLANGS="$HOME/langtech/gut/giellalt"
# Path to giella-core (for missing.py and cg-dep2dot.py)
export GTCORE="$HOME/langtech/gut/giellalt/giella-core"
# Enable debug logging (default: false)
export ENABLE_LOGGING=trueTo use text analysis features, you need a built .drb analyser file:
cd $GTLANGS/lang-sme # or lang-sma, lang-smj, etc.
./configure --enable-analyser-tool --enable-tokenisers
makeThe helper automatically finds bundle.drb or ${LANGCODE}.drb in tools/analysers/ directories.
Analyzes words in LexC files and suggests missing lexicon entries using missing.py from giella-core.
Usage:
- Open a
.lexcfile in SubEthaEdit - Press
⌃⌥⌘M(Ctrl+Option+Cmd+M) - Get suggestions for missing entries
How it works:
- SubEthaEdit sends JSON request via clipboard
- Helper runs
missing.pywith the word list - Results are returned via clipboard to SubEthaEdit
System-wide macOS Service that analyzes selected text from any application.
Usage:
- Select text in any app (Safari, Mail, TextEdit, etc.)
- Right-click → Services → Analyze Text
- Results open in SubEthaEdit (vislcg3 format)
Output format:
"<word>"
"lemma" POS Tags... <W:0.0> @SYNTAG #id->head
Shows:
- Morphological analysis (lemma, part-of-speech, grammatical tags)
- Syntactic function tags
- Dependency relations
System-wide service that creates visual dependency tree diagrams.
Usage:
- Select text in any application
- Right-click → Services → Draw Dependency Tree
- PNG image opens in Preview (can be copied)
How it works:
- Analyzes text with
divvun-runtime - Converts to dependency tree with
cg-dep2dot.py - Generates PNG with Graphviz
- Opens in Preview for viewing/copying
Change language by editing ~/.divvun-see-helper-config:
export DEFAULT_ANALYSIS_LANG="sma" # Change from sme to smaAll services use this setting. Make sure you have a built analyser for the language.
To distribute without macOS security warnings, you need an Apple Developer account.
cp .env.example .env
# Edit .env with your Apple Developer credentials
source .envRequired variables:
CODESIGN_IDENTITY- Your signing identityAPPLE_TEAM_ID- Your Team IDAPPLE_ID- Your Apple ID emailAPPLE_APP_PASSWORD- App-specific password
make sign # Code sign the app
make notarize # Notarize with AppleEnable logging in ~/.divvun-see-helper-config:
export ENABLE_LOGGING=trueView logs:
tail -f ~/divvun-see-helper-debug.logThe log shows:
- Operations performed
- File paths searched
- Command execution details
- Error messages
The helper uses clipboard-based JSON communication with base64-encoded input:
Request format:
{
"operation": "divvun_analyze",
"lang": "sme",
"gtlangs": "/path/to/giellalt",
"input_words_b64": "<base64-encoded text>"
}Response format:
{
"status": "success",
"output": "<analysis result>"
}Error format:
{
"status": "error",
"message": "Error description",
"details": "Additional information"
}analyze_missing- Find missing LexC entries (usesmissing.py)divvun_analyze- Morphological and syntactic analysis (usesdivvun-runtime)
Divvun-SEE-helper.app/
├── Contents/
│ ├── Info.plist
│ └── MacOS/
│ ├── run-helper # UTF-8 wrapper
│ ├── divvun-see-helper # Main script
│ ├── analyze-text-service.sh # Service: text analysis
│ └── draw-dependency-tree-service.sh # Service: tree visualization
Path handling:
- Automatically extends
PATHto include~/.cargo/bin,/usr/local/bin,/opt/homebrew/bin - Essential for finding
divvun-runtimein macOS Services context
File search:
- Searches for analysers:
${GTLANGS}/lang-${LANGCODE}/*/tools/analysers/{bundle.drb,${LANGCODE}.drb} - Uses newest file if multiple found (modification time)
- Searches up to 5 directory levels
MIT - see LICENSE file.
Divvun/Giellatekno
- GitHub: https://github.com/divvun
- Website: https://giellalt.github.io
- services/README.md - Detailed service documentation
- giella-core - Core Giellalt tools
- SubEthaEdit - Collaborative text editor