Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Grammar for natural language business rules
Grammar for natural language business rules [message #655359] Sat, 19 February 2011 20:08 Go to next message
Richard Fagot is currently offline Richard FagotFriend
Messages: 1
Registered: February 2011
Junior Member
Hi,

I would like to create a natural language for writing business rules (the end language is Drools (JBoss Rules)) for a POC.

I would like to write a grammar using some keywords (uppercase words in the following example) and using phrase depending of the DSL (lowercase words in the example).

The idea is to have auto-completion for keywords and phrase. If I CTRL+space after 'the' I would like all possible words following 'the'. (for example 'age' and 'name')

Is it possible with XText ?

IF the age of the student IS LESS THAN 18
THEN the student can not drive



class Student {
  int age;
  String name;
  boolean canDrive;
}

Re: Grammar for natural language business rules [message #655364 is a reply to message #655359] Sat, 19 February 2011 22:40 Go to previous messageGo to next message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2509
Registered: July 2009
Senior Member
Yes.
How much you get for free (generated from the grammar), and how much you
need to customize depends on design considerations.

The Xtext documentation contains all the information you need to get
started.

- henrik

On 2/19/11 9:08 PM, Richard Fagot wrote:
> Hi,
>
> I would like to create a natural language for writing business rules
> (the end language is Drools (JBoss Rules)) for a POC.
>
> I would like to write a grammar using some keywords (uppercase words in
> the following example) and using phrase depending of the DSL (lowercase
> words in the example).
>
> The idea is to have auto-completion for keywords and phrase. If I
> CTRL+space after 'the' I would like all possible words following 'the'.
> (for example 'age' and 'name')
>
> Is it possible with XText ?
>
>
> IF the age of the student IS LESS THAN 18
> THEN the student can not drive
>
>
>
>
> class Student {
> int age;
> String name;
> boolean canDrive;
> }
>
>
Re: Grammar for natural language business rules [message #893501 is a reply to message #655359] Wed, 04 July 2012 11:26 Go to previous message
Cristiano Gavião is currently offline Cristiano GaviãoFriend
Messages: 279
Registered: July 2009
Senior Member
Hi Richard,

have you realized the POC?

I have some challenge like yours and would like more info.

regards,

Cristiano
Previous Topic:Script with condition
Next Topic:Introduction to OCL
Goto Forum:
  


Current Time: Mon Feb 24 12:47:07 GMT 2020

Powered by FUDForum. Page generated in 0.04290 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top