Skip to content

Conversation

@subins2000
Copy link
Member

@subins2000 subins2000 commented Sep 14, 2020

http://savannah.nongnu.org/bugs/?40807

Implemented options :

❯ ./varnamc --help
Usage: varnamc [OPTION...] 
an Indic language transliteration library

  -a, --train=PATTERN=WORD   Train the given text
  -d, --details[=]           Detailed transliteration output. Use with
                             --transliterate
  -e, --export-full=FILE     Export words and patterns to the specified
                             directory
  -f, --learn-from=FILE      Reads from the specified file
  -i, --import-learnings-from=FILE
                             Import learned data from the specified file
  -n, --learn=TEXT           Learn the given text
  -r, --reverse-transliterate=TEXT
                             Reverse transliterate the given text
  -s, --symbols=VALUE        Sets the symbols file
  -t, --transliterate=TEXT   Transliterate the given text
  -?, --help                 Give this help list
      --usage                Give a short usage message
  -v, --version[=]           Display version

* Text transliteration works
@subins2000 subins2000 changed the title Intial port of varnamc from Ruby to C Port of varnamc from Ruby to C Sep 14, 2020
@subins2000 subins2000 changed the title Port of varnamc from Ruby to C varnamc CLI utility in C Sep 15, 2020
@subins2000 subins2000 marked this pull request as ready for review September 17, 2020 18:46
* set to NULL since it's valueless.
* Modifies str so make a copy if this is a problem
*/
int split( char * str, char delim, char ***array )
Copy link

@joicemjoseph joicemjoseph Sep 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/antirez/sds

could you try this library. check whether this helps

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Tokenization part in that SDS library is exactly what we need. So, C libraries are used just by copy-paste ah ? Perhaps I should use git submodules for better dependency injection.

@subins2000
Copy link
Member Author

Realized GNU argp is not available on mac, windows or android. To get argp on them, it'd take some extra work. So this'll only work good on Linux for now.

I tried compiling it on Android, but failed because of

  1. no argp
  2. When trying to compile argp-standalone, no gettablesize

@subins2000
Copy link
Member Author

subins2000 commented Sep 19, 2020

@joicemjoseph Can you try statically compiling this on Mac and see if it works. I guess it'd need argp-standalone

@joicemjoseph
Copy link

Will try and let you know.

subins2000 added a commit to subins2000/libvarnam that referenced this pull request Sep 19, 2020
subins2000 added a commit to subins2000/libvarnam that referenced this pull request Oct 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants