codex-wordmap is a tool for mapping translated words of the Bible to the source Hebrew and Greek words. This is a VSCodium plugin designed to operate alongside the codex-editor plugin.
- Node.js (version 18.16.0 or higher)
- npm (version 9.5.1 or higher)
- VSCodium
You can find the codex-wordmap plugin on the following platform:
git clone https://github.com/JEdward7777/codex-wordmap
cd codex-wordmap
npm install
cd webview-ui/wordmap_wrapper
npm install
To build the project, run the following command from the main repository directory:
npm run build
This will also compile the sub-repository.
-
Install the VSCE (Visual Studio Code Extensions) tool globally:
npm install -g @vscode/vsce
-
Create the
vsix
file using the following command:vsce package
The file format for installing an extension outside of the store is
.vsix
. See more information here.
- Open this project in VSCodium.
- Press
F5
to start debugging. This will launch an instance of VSCodium with the extension loaded. - In the new instance of VSCodium that opens, you can open or create a Codex project and use the extension for debugging purposes.
- After creating the
.vsix
file (as described above), open VSCodium. - Go to the Extensions view by clicking the Extensions icon in the Activity Bar on the side of the window or by pressing
Ctrl+Shift+X
. - Click the three horizontal dots in the top right corner of the Extensions view.
- Select "Install from VSIX..." from the dropdown menu.
- Navigate to the location of the
.vsix
file you created and select it. - The extension will be installed and ready to use.
-
Open a Codex project using the codex-editor plugin's
Codex Cell Editor
. Within the Codex project, open a Codex notebook. -
Make sure the codex notebook is saved. The white dot must be gone from the tab.
-
Associate the Codex file with a source USFM file:
- Press
Ctrl+Shift+P
and type "Connect Source USFM". - Select the USFM file for the specific book. This file might have been downloaded separately or might be in the resources folder downloaded by the Codex system.
- Verify the connected USFM file using the command "View Connected Source USFM".
- Press
-
Activate the verse you wish to run wordmap on.
-
Click the wordmap button on the bottom ribbon of the screen.
-
Modify the alignment as desired.
-
Select
Accept
to close the wordmap tab orCancel
to discard alignment changes.
- With a Codex project opened in VSCodium, press
Ctrl+Shift+P
and type "Import USFM". - Note: The USFM files must be in the ORG versification format. If they are not, the AI tools will not be coherent as verse references will be mismatched.
- Select the USFM file to import.
- The related Codex file will appear under
files/target
in the current Codex project.
- Open the Codex file within the Codex project that you want to export.
- Press
Ctrl+Shift+P
and type "Export USFM". - Identify where you want the exported USFM saved and press enter.
- The USFM file will be exported to the specified location.
codex-wordmap includes the following configurable settings related to alignment training:
-
codex-wordmap.alignmentTraining.enabled
- This setting enables or disables the background training of the alignment suggestion model. If enabled, every time the Codex notebook is saved, the model will retrain in a background thread. This model is used in the wordmap webview to provide alignment suggestions.
-
codex-wordmap.alignmentTraining.bookGroups
- This is a list of book Codex files that should be grouped together when training the alignment AI. Due to the different languages, Old Testament (OT) and New Testament (NT) should be separate groups. Each Codex file should be on its own line, and separate groups should be separated with an empty line. Any file that doesn't match a group will be assumed to be in its own group. The path is relative to the files/target project folder and the .codex extension is optional. The AI model can be overwhelmed by too many books grouped together, so it is best to only group smaller books.
# Group for Old Testament
Exodus
Leviticus
# Group for New Testament
TITUS
GALATIANS
To modify the alignment training settings for codex-wordmap:
- Open VSCodium and press
Ctrl+Shift+P
to open the Command Palette. - Type "Preferences: Open Settings (UI)" to access the settings editor with a user-friendly interface.
- In the settings, search for
codex-wordmap
to find and modify the relevant settings likealignmentTraining.enabled
andalignmentTraining.bookGroups
. - Adjust the settings as needed, and ensure your configuration reflects the desired setup for alignment training.
To familiarize yourself with the project, please refer to the following YouTube video tutorial.
This project is licensed under the MIT License. See the LICENSE file for more details.