Skip to content

Commit

Permalink
Added languages for Scheme Detection and Transliterate
Browse files Browse the repository at this point in the history
* It detects all possible scripts that the language supports
* Added exhaustive list of Brahmic Schemes
  • Loading branch information
vbasky committed Jun 5, 2020
1 parent 2be08e8 commit 7ba0cd1
Show file tree
Hide file tree
Showing 11 changed files with 1,323 additions and 619 deletions.
1 change: 1 addition & 0 deletions .php_cs.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"php":"7.4.6","version":"2.16.3","indent":" ","lineEnding":"\n","rules":{"array_syntax":{"syntax":"short"},"binary_operator_spaces":{"align_double_arrow":true,"align_equals":true},"blank_line_after_opening_tag":true,"blank_line_before_statement":{"statements":["return"]},"braces":{"allow_single_line_closure":false,"position_after_control_structures":"same","position_after_functions_and_oop_constructs":"next","position_after_anonymous_constructs":"same"},"cast_spaces":true,"class_attributes_separation":{"elements":["method"]},"class_definition":{"single_line":true},"concat_space":{"spacing":"one"},"declare_equal_normalize":true,"function_typehint_space":true,"include":true,"increment_style":true,"lowercase_cast":true,"lowercase_static_reference":true,"magic_constant_casing":true,"magic_method_casing":true,"method_argument_space":true,"native_function_casing":true,"native_function_type_declaration_casing":true,"new_with_braces":true,"no_blank_lines_after_class_opening":true,"no_blank_lines_after_phpdoc":true,"no_empty_comment":true,"no_empty_phpdoc":true,"no_empty_statement":true,"no_extra_blank_lines":{"tokens":["curly_brace_block","extra","parenthesis_brace_block","square_brace_block","throw","use"]},"no_leading_import_slash":true,"no_leading_namespace_whitespace":true,"no_mixed_echo_print":true,"no_multiline_whitespace_around_double_arrow":true,"no_short_bool_cast":true,"no_singleline_whitespace_before_semicolons":true,"no_spaces_around_offset":true,"no_superfluous_phpdoc_tags":{"allow_mixed":true},"no_trailing_comma_in_list_call":true,"no_trailing_comma_in_singleline_array":true,"no_unneeded_control_parentheses":true,"no_unneeded_curly_braces":{"namespaces":true},"no_unused_imports":true,"no_whitespace_before_comma_in_array":true,"no_whitespace_in_blank_line":true,"normalize_index_brace":true,"object_operator_without_whitespace":true,"ordered_imports":{"sort_algorithm":"length"},"php_unit_fqcn_annotation":true,"phpdoc_align":{"tags":["method","param","property","return","throws","type","var"]},"phpdoc_annotation_without_dot":true,"phpdoc_indent":true,"phpdoc_inline_tag":true,"phpdoc_no_access":true,"phpdoc_no_alias_tag":true,"phpdoc_no_package":true,"phpdoc_no_useless_inheritdoc":true,"phpdoc_return_self_reference":true,"phpdoc_scalar":true,"phpdoc_separation":true,"phpdoc_single_line_var_spacing":true,"phpdoc_summary":true,"phpdoc_to_comment":true,"phpdoc_trim":true,"phpdoc_trim_consecutive_blank_line_separation":true,"phpdoc_types":true,"phpdoc_types_order":{"null_adjustment":"always_last","sort_algorithm":"none"},"phpdoc_var_without_name":true,"return_type_declaration":true,"semicolon_after_instruction":true,"short_scalar_cast":true,"single_blank_line_before_namespace":true,"single_class_element_per_statement":true,"single_line_comment_style":{"comment_types":["hash"]},"single_line_throw":true,"single_quote":true,"single_trait_insert_per_statement":true,"space_after_semicolon":{"remove_in_empty_for_expressions":true},"standardize_increment":true,"standardize_not_equals":true,"ternary_operator_spaces":true,"trailing_comma_in_multiline_array":true,"trim_array_spaces":true,"unary_operator_spaces":true,"whitespace_after_comma_in_array":true,"blank_line_after_namespace":true,"constant_case":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"no_break_comment":true,"no_closing_tag":true,"no_spaces_after_function_name":true,"no_spaces_inside_parenthesis":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_import_per_statement":true,"single_line_after_imports":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"visibility_required":true,"encoding":true,"full_opening_tag":true,"linebreak_after_opening_tag":true,"phpdoc_order":true,"phpdoc_add_missing_param_annotation":true,"not_operator_with_successor_space":true},"hashes":{"tests\/IndicScriptToggle.php":929689902,"tests\/IndicScriptOptions.php":4259228885,"tests\/IndicScriptTransliteration.php":2990208701,"tests\/IndicScriptBase.php":3379312305,"tests\/IndicScriptTest.php":192839363,"tests\/IndicScriptDravidian.php":3584505102,"src\/Facades\/IndicScript.php":3615585633,"src\/IndicScriptServiceProvider.php":1068701252,"src\/IndicScript.php":925775904}}
27 changes: 3 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Introduction

IndicScript is a transliteration library for Indian languages written in PHP. It supports the most popular Indian scripts and several different romanization schemes. Although IndicScript focuses on Sanskrit transliteration, it has partial support for other languages and is easy to extend.
IndicScript is a transliteration library for Indian languages written in PHP. It supports the most popular Indian scripts and several different romanization schemes. Although IndicScript focuses on Sanskrit transliteration, it has partial support for other Indic scripts and is easy to extend.

## Requirements

Expand Down Expand Up @@ -59,28 +59,7 @@ Here, `$from` and `$to` are the names of different **schemes**. In IndicScript,
1. **Brahmic** schemes, which are _abugidas_. All Indian scripts are Brahmic schemes.
2. **Roman** schemes, which are _alphabets_. All romanizations are Roman schemes.

By default, IndicScript supports the following Brahmic schemes:

- `bengali`
- `devanagari`
- `gujarati`
- `gurmukhi`
- `kannada`
- `malayalam`
- `oriya`
- `tamil`
- `telugu`

and the following Roman schemes:

- `hk` (Harvard-Kyoto)
- `iast` (International Alphabet of Sanskrit Transliteration)
- `itrans` (ITRANS)
- `itrans_dravidian` (ITRANS with support for Dravidian short "e" and "o")
- `kolkata` (National Library at Kolkata)
- `slp1` (Sanskrit Library Phonetic Basic)
- `velthuis` (Velthuis)
- `wx` (WX)
The list of all **Brahmic** and **Roman** schemes supported are available here [Schemes](Schemes.md)

### Disabling transliteration

Expand Down Expand Up @@ -124,4 +103,4 @@ $IndicScript->addBrahmicScheme($schemeName, $schemeData);
$IndicScript->addRomanScheme($schemeName, $schemeData);
```

For help in creating `$schemeData`, see the comments on the `addBrahmicScheme` and `addRomanScheme` functions.
For help in creating `$schemeData`, see the comments on the `addBrahmicScheme` and `addRomanScheme` functions.
85 changes: 85 additions & 0 deletions SCHEMES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Schemes

## Brahmic Schemes

* `ahom`
* `assamese`
* `avestan`
* `balinese`
* `bengali`
* `bhaisuki`
* `brahmi`
* `brahmi_tamil`
* `burmese`
* `chakma`
* `cham`
* `devanagari`
* `dogra`
* `gondi_gunjala`
* `gondi_masaram`
* `grantha`
* `grantha_pandya`
* `gujarati`
* `gurmukhi`
* `javanese`
* `kannada`
* `khamti_shan`
* `kharoshti`
* `khmer`
* `khom_thai`
* `khudawadi`
* `kolkata`
* `lao`
* `lao_pali`
* `lepcha`
* `limbu`
* `mahajani`
* `malayalam`
* `manipuri`
* `marchen`
* `modi`
* `mon`
* `mro`
* `multani`
* `newa`
* `ol_chiki`
* `oriya`
* `persian_old`
* `phags_pa`
* `ranjana`
* `rejang`
* `rohingya`
* `shan`
* `sharada`
* `siddham`
* `sinhala`
* `sora_sompeng`
* `sundanese`
* `syloti_nagari`
* `tagalog`
* `tagbanwa`
* `tai_laing`
* `takri`
* `tamil`
* `tamil_extended`
* `tamil_superscripted`
* `telugu`
* `thai`
* `tibetan`
* `tirhuta_maithili`
* `urdu` (Abjad)
* `vattelutu`
* `wancho`
* `warang_citi`

## Roman Schemes

* `hk` (Harvard-Kyoto)
* `iast` (International Alphabet of Sanskrit Transliteration)
* `itrans` (ITRANS)
* `itrans_dravidian` (ITRANS with support for Dravidian short "e" and "o")
* `kolkata` (National Library at Kolkata)
* `slp1` (Sanskrit Library Phonetic Basic)
* `velthuis` (Velthuis)
* `wx` (WX)
* `cyrillic`
Loading

0 comments on commit 7ba0cd1

Please sign in to comment.