Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting star original formatting in object macros #112

Open
staticdev opened this issue Oct 19, 2017 · 2 comments
Open

Getting star original formatting in object macros #112

staticdev opened this issue Oct 19, 2017 · 2 comments

Comments

@staticdev
Copy link

staticdev commented Oct 19, 2017

> object names python
    return ' '.join(args) # python3
< object

+ what [is|are] [the] (name|names) of *
- <call>names <star2></call> // or some other syntax

Is there a syntactic sugar or an easy way of getting 'Jason, Billy and Lara' from 'What are the names of Jason, Billy and Lara?'

@htdinh
Copy link
Contributor

htdinh commented Nov 20, 2017

@staticdev As far as I know, RiveScript preprocesses the message (which remove the non-syntax-related characters such as , Code Line 52 out before getting a reply Code Line 68). At this time of reply it doesn't (can't) recover the original formatting of the stars (in the end a regex match).

@htdinh
Copy link
Contributor

htdinh commented Nov 20, 2017

Just in case someone wants to have a quick code. You need to set star2 (otherwise, star alone would return you the choice of name or names).

+ what [is|are] [the] (name|names) of *
- {formal}<star2>{/formal}

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

No branches or pull requests

2 participants