Page 1 of 1
Languages for Text handling and parsing
Posted: Fri Mar 08, 2013 12:50 am
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, ......?
Re: Languages for Text handling and parsing
Posted: Fri Mar 08, 2013 1:37 am
by bluemoon
It depends on what level of parsing you expect, PERL has built-in regex functions.
Re: Languages for Text handling and parsing
Posted: Fri Mar 08, 2013 7:04 am
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.
Re: Languages for Text handling and parsing
Posted: Fri Mar 08, 2013 11:54 am
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
Re: Languages for Text handling and parsing
Posted: Fri Mar 08, 2013 12:41 pm
by bluemoon
For anything more complicate than parsing tokens you may consider yacc or other parser generator.
Re: Languages for Text handling and parsing
Posted: Fri Mar 08, 2013 6:47 pm
by zeitue
So any language that has a parser generator like lex and yacc will work great then
So the answer is any language then, thanks
I do hope this idea works though.
Re: Languages for Text handling and parsing
Posted: Fri Mar 08, 2013 11:16 pm
by trinopoty
If I understand you correctly. You are trying to say that the user will command the os in his/her natural language?
Re: Languages for Text handling and parsing
Posted: Sun Mar 10, 2013 11:39 am
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.
Re: Languages for Text handling and parsing
Posted: Sun Mar 10, 2013 7:35 pm
by Mikemk
By language, do you mean computer language or human language?
Re: Languages for Text handling and parsing
Posted: Mon Mar 11, 2013 11:40 am
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.
Re: Languages for Text handling and parsing
Posted: Wed Mar 13, 2013 11:26 am
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
Re: Languages for Text handling and parsing
Posted: Wed Mar 13, 2013 11:32 am
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
Re: Languages for Text handling and parsing
Posted: Wed Mar 13, 2013 11:58 am
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)
Re: Languages for Text handling and parsing
Posted: Wed Mar 13, 2013 2:10 pm
by zeitue
Ah, I have this planned for later, as part of my VUI
although I could just run my old AI on it or the brain.