macOS system service for analyzing selected text using divvun-runtime and opening results in SubEthaEdit.
- System-wide text analysis: Works in any macOS application
- Context menu integration: Right-click → Services → "Analyze Text"
- Automatic SubEthaEdit integration: Results open in vislcg3 mode
- Configurable language: Set default analysis language in config file
cd divvun-see-helper
make install-serviceOr manually:
cd services
./install-service.sh-
Divvun-SEE-helper.app must be installed:
make install
-
divvun-runtime must be installed:
brew install divvun/divvun/divvun-runtime
-
Built analyser (
.drbfile) for your language:cd /path/to/lang-xxx ./configure make
Edit ~/.divvun-see-helper-config:
# Default language for text analysis (ISO 639-3 code)
export DEFAULT_ANALYSIS_LANG="sme"
# Path to giellalt root directory (not language-specific)
export GTLANGS="$HOME/langtech/gut/giellalt"Any language with a built .drb analyser:
sme- North Sámisma- South Sámismj- Lule Sámi- etc.
- Select text in any application (Safari, TextEdit, Mail, etc.)
- Right-click on the selected text
- Choose Services → Analyze Text (or "Analyser tekst")
- Wait for analysis to complete
- SubEthaEdit opens with the analyzed text in vislcg3 format
You can assign a keyboard shortcut:
- Open System Settings
- Go to Keyboard → Keyboard Shortcuts → Services
- Find "Analyze Text" under "Text"
- Click to add a shortcut (e.g.,
⌃⌥⌘A)
Selected text
↓
analyze-text-service.sh
↓
divvun-see-helper (divvun_analyze operation)
↓
divvun-runtime with .drb file
↓
SubEthaEdit (vislcg3 mode)
-
analyze-text-service.sh: Main service script
- Receives text from stdin
- Calls divvun-see-helper with divvun_analyze operation
- Opens result in SubEthaEdit
-
Automator Workflow: macOS Quick Action
- Appears in Services menu
- Passes selected text to service script
- Available in all applications
If the workflow wasn't installed automatically:
- Open Automator
- Create new Quick Action
- Set workflow receives text in any application
- Add action: Run Shell Script
- Shell:
/bin/bash - Pass input: to stdin
- Script:
"$HOME/Applications/Divvun-SEE-helper.app/Contents/MacOS/analyze-text-service.sh"
- Shell:
- Save as "Analyze Text" (or "Analyser tekst")
- The service will now appear in the Services menu
-
Restart Services:
/System/Library/CoreServices/pbs -flush
Or log out and back in.
-
Check installation:
ls -la ~/Library/Services/Should show "Analyze Text.workflow" or "Analyser tekst.workflow"
-
Verify script location:
ls -la ~/Applications/Divvun-SEE-helper.app/Contents/MacOS/analyze-text-service.sh
Install divvun-runtime:
brew install divvun/divvun/divvun-runtimeBuild the analyser for your language:
cd /path/to/lang-xxx
./configure
makeVerify the .drb file exists:
find ~/langtech -name "sme.drb" # or your language codeCheck the helper log (if logging is enabled):
tail -50 ~/divvun-see-helper-debug.logEnable logging in ~/.divvun-see-helper-config:
export ENABLE_LOGGING=trueThe service will try to open the result with the default text editor if SubEthaEdit is not found. Install SubEthaEdit from:
make uninstall-serviceOr manually:
cd services
./uninstall-service.shThis removes:
- Service script from Divvun-SEE-helper.app
- Automator workflows from ~/Library/Services/
The configuration file (~/.divvun-see-helper-config) is preserved.
You can create separate services for different languages by duplicating the Automator workflow and modifying the script to use a different language:
# Instead of reading from config, hardcode the language:
DEFAULT_ANALYSIS_LANG="sma"
GTLANGS="$HOME/langtech/gut/giellalt"Modify analyze-text-service.sh to:
- Save output to a specific location
- Open in a different editor
- Post-process the analysis result
- Display in a notification instead
MIT - see LICENSE file in parent directory.