feat: add symbol removal API with accept conditions#68
Open
mufeedvh wants to merge 1 commit intovarnamproject:masterfrom
Open
feat: add symbol removal API with accept conditions#68mufeedvh wants to merge 1 commit intovarnamproject:masterfrom
mufeedvh wants to merge 1 commit intovarnamproject:masterfrom
Conversation
- Add VMRemoveTokens function to remove tokens based on pattern, value, type and accept conditions - Add vm_remove_tokens C export for Ruby FFI integration - Add comprehensive unit tests for the removal functionality - Addresses varnamproject#23 This allows fine-grained control over symbol generation by enabling removal of specific symbols based on their position (starts_with, ends_with, in_between).
mufeedvh
added a commit
to mufeedvh/schemes
that referenced
this pull request
Jun 21, 2025
- Add FFI binding for vm_remove_tokens function - Add _remove_token base method for internal use - Add removal methods for all symbol types: - remove_vowels - remove_consonants - remove_consonant_vowel_combinations - remove_anusvara - remove_visarga - remove_virama - remove_symbols - remove_numbers - remove_others - Add test examples and Malayalam scheme example - Complements varnamproject/govarnam#68 This enables scheme authors to remove specific symbols based on their position (starts_with, ends_with, in_between), providing fine-grained control over transliteration rules. Example usage: remove_anusvara({:accept_if => :ends_with}, "m" => ["മ്"])
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
VMRemoveTokensfunction for fine-grained token removalChanges
VMRemoveTokensfunction invst_maker.gothat removes tokens based on:vm_remove_tokensC export inc-shared.gofor Ruby integrationvst_maker_test.goAPI Usage
Test plan
Fixes #23