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

Add template to test sampling sentences script #2663

Open
spuljko opened this issue Nov 26, 2024 · 3 comments
Open

Add template to test sampling sentences script #2663

spuljko opened this issue Nov 26, 2024 · 3 comments
Labels

Comments

@spuljko
Copy link
Contributor

spuljko commented Nov 26, 2024

Script that generates sample sentences currently accepts intent. Since intents can have lot's of variations specifying template to generate sentences could be more appropriate, for example
python3 -m script.intentfest sample --language en --template "turn [on] [the] light[s] [on]"

@v1k70rk4
Copy link
Member

Is this what you mean?
python3 -m script.intentfest sample_template "turn [on] [the] light[s] [on]"

@spuljko
Copy link
Contributor Author

spuljko commented Nov 26, 2024

That can't generate sentences with expansion rules. For example this sentence template:
"<open> <area> {cover_classes:device_class}"

@tetele
Copy link
Contributor

tetele commented Nov 27, 2024

You can add lists, ranges, and expansion rules as well:
python3 -m script.intentfest sample_template 'set color to <color> and brightness to {brightness}' --values color red green --range brightness 1 2 --rule color '[the] {color}'

From here

@duhow duhow added the lang: en label Nov 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants