Languages for Text handling and parsing

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
zeitue
Member
Member
Posts: 88
Joined: Fri Dec 14, 2012 6:05 pm
Libera.chat IRC: zeitue
Location: United States, Texas
Contact:

Languages for Text handling and parsing

Post by zeitue »

In the OSdev wiki under the "getting started" page at point "Choosing your development environment" it says
Perl or Python: One of these two scripting languages should be installed. Useful for string manipulation, amongst other things. Perl used to be the recommendation, but Python is now quite mature, and is possibly easier to learn. Both have hundreds of packages/modules available for doing various tasks.
Does this include parsing?

I'd like to know are there other languages that would work for this besides Python and Perl?

Maybe Ruby, Common Lisp, Scheme, Clojure, PHP, BASH, Scala, R, ......?
### Z++; && S++; ###
zeitue is pronounced zeɪtə
Web Site::Bit Bucket
Programming Languages: C, C++, Java, Ruby, Common Lisp, Clojure
Languages: English, zɪ̀ŋ, 日本語, maitraiuen
User avatar
bluemoon
Member
Member
Posts: 1761
Joined: Wed Dec 01, 2010 3:41 am
Location: Hong Kong

Re: Languages for Text handling and parsing

Post by bluemoon »

It depends on what level of parsing you expect, PERL has built-in regex functions.
User avatar
iansjack
Member
Member
Posts: 4711
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: Languages for Text handling and parsing

Post by iansjack »

There are also a number of Perl modules for more complicated parsing jobs. I'd say it's one of the better languages for this purpose. It is, after all, the sort of thing it was designed for.
User avatar
zeitue
Member
Member
Posts: 88
Joined: Fri Dec 14, 2012 6:05 pm
Libera.chat IRC: zeitue
Location: United States, Texas
Contact:

Re: Languages for Text handling and parsing

Post by zeitue »

I'm looking for full level not just like code parser and regexp but also parsing of natural languages.
I have an idea to integrate translation into the core of the system, and allow translated strings at a very low level; so users can use their native language at base. I know this will be hard.
I'll have a translation server that all user output will be sent through before reaching the users eyes.

I'm not sure if this is a good idea or not but it does not hurt to try :wink:
### Z++; && S++; ###
zeitue is pronounced zeɪtə
Web Site::Bit Bucket
Programming Languages: C, C++, Java, Ruby, Common Lisp, Clojure
Languages: English, zɪ̀ŋ, 日本語, maitraiuen
User avatar
bluemoon
Member
Member
Posts: 1761
Joined: Wed Dec 01, 2010 3:41 am
Location: Hong Kong

Re: Languages for Text handling and parsing

Post by bluemoon »

For anything more complicate than parsing tokens you may consider yacc or other parser generator.
User avatar
zeitue
Member
Member
Posts: 88
Joined: Fri Dec 14, 2012 6:05 pm
Libera.chat IRC: zeitue
Location: United States, Texas
Contact:

Re: Languages for Text handling and parsing

Post by zeitue »

So any language that has a parser generator like lex and yacc will work great then :D

So the answer is any language then, thanks :)

I do hope this idea works though.
### Z++; && S++; ###
zeitue is pronounced zeɪtə
Web Site::Bit Bucket
Programming Languages: C, C++, Java, Ruby, Common Lisp, Clojure
Languages: English, zɪ̀ŋ, 日本語, maitraiuen
User avatar
trinopoty
Member
Member
Posts: 87
Joined: Wed Feb 09, 2011 2:21 am
Location: Raipur, India

Re: Languages for Text handling and parsing

Post by trinopoty »

If I understand you correctly. You are trying to say that the user will command the os in his/her natural language?
Always give a difficult task to a lazy person. He will find an easy way to do it.
User avatar
zeitue
Member
Member
Posts: 88
Joined: Fri Dec 14, 2012 6:05 pm
Libera.chat IRC: zeitue
Location: United States, Texas
Contact:

Re: Languages for Text handling and parsing

Post by zeitue »

trinopoty wrote:If I understand you correctly. You are trying to say that the user will command the os in his/her natural language?
Yes, that is correct.
I intend for there to be no language seen anywhere but the user's native or selected language.
### Z++; && S++; ###
zeitue is pronounced zeɪtə
Web Site::Bit Bucket
Programming Languages: C, C++, Java, Ruby, Common Lisp, Clojure
Languages: English, zɪ̀ŋ, 日本語, maitraiuen
Mikemk
Member
Member
Posts: 409
Joined: Sat Oct 22, 2011 12:27 pm

Re: Languages for Text handling and parsing

Post by Mikemk »

By language, do you mean computer language or human language?
Programming is 80% Math, 20% Grammar, and 10% Creativity <--- Do not make fun of my joke!
If you're new, check this out.
User avatar
zeitue
Member
Member
Posts: 88
Joined: Fri Dec 14, 2012 6:05 pm
Libera.chat IRC: zeitue
Location: United States, Texas
Contact:

Re: Languages for Text handling and parsing

Post by zeitue »

m12 wrote:By language, do you mean computer language or human language?
I mean computer language :)

I have a language that is a human language, I'm developing for this too though.
### Z++; && S++; ###
zeitue is pronounced zeɪtə
Web Site::Bit Bucket
Programming Languages: C, C++, Java, Ruby, Common Lisp, Clojure
Languages: English, zɪ̀ŋ, 日本語, maitraiuen
Mikemk
Member
Member
Posts: 409
Joined: Sat Oct 22, 2011 12:27 pm

Re: Languages for Text handling and parsing

Post by Mikemk »

It would be neat, though incredibly difficult, to implement english into the main ui of an operating system, rather than clickable points/character codes.

PS, this is a [side] goal in my os
Programming is 80% Math, 20% Grammar, and 10% Creativity <--- Do not make fun of my joke!
If you're new, check this out.
User avatar
zeitue
Member
Member
Posts: 88
Joined: Fri Dec 14, 2012 6:05 pm
Libera.chat IRC: zeitue
Location: United States, Texas
Contact:

Re: Languages for Text handling and parsing

Post by zeitue »

m12 wrote:It would be neat, though incredibly difficult, to implement english into the main ui of an operating system, rather than clickable points/character codes.

PS, this is a [side] goal in my os
Actually I believe points/character codes would be what the English strings would be match to, by use of the Resource Manager to supply a localized string.

maybe I'm missing what you're meaning though :?
### Z++; && S++; ###
zeitue is pronounced zeɪtə
Web Site::Bit Bucket
Programming Languages: C, C++, Java, Ruby, Common Lisp, Clojure
Languages: English, zɪ̀ŋ, 日本語, maitraiuen
Mikemk
Member
Member
Posts: 409
Joined: Sat Oct 22, 2011 12:27 pm

Re: Languages for Text handling and parsing

Post by Mikemk »

Like, I can tell it to do something, and it figures out how.

For example,
"Order a pizza"
"Would you like Pizza Hut or Hut Pizza" (examples)
Programming is 80% Math, 20% Grammar, and 10% Creativity <--- Do not make fun of my joke!
If you're new, check this out.
User avatar
zeitue
Member
Member
Posts: 88
Joined: Fri Dec 14, 2012 6:05 pm
Libera.chat IRC: zeitue
Location: United States, Texas
Contact:

Re: Languages for Text handling and parsing

Post by zeitue »

Ah, I have this planned for later, as part of my VUI 8)

although I could just run my old AI on it or the brain.
### Z++; && S++; ###
zeitue is pronounced zeɪtə
Web Site::Bit Bucket
Programming Languages: C, C++, Java, Ruby, Common Lisp, Clojure
Languages: English, zɪ̀ŋ, 日本語, maitraiuen
Post Reply