-
-
Notifications
You must be signed in to change notification settings - Fork 2
Intents #37
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
Conversation
some utterances are not sent to common query when they should, expand the voc for the short-circuit check so more utterances are caught
some utterances are not sent to common query when they should, expand the voc for the short-circuit check so more utterances are caught
Warning Rate limit exceeded@JarbasAl has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 20 minutes and 57 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (8)
WalkthroughThis pull request updates several GitHub Actions workflows to use Python 3.11 instead of 3.8 and reduces the tested Python version matrix. It also revises the branch used for publishing from “dev” to “master” and introduces a new Changes
Sequence Diagram(s)sequenceDiagram
participant R as Repository
participant RW as Release Workflow
participant T as Translations Job
participant PA as Publish Alpha Job
R->>RW: Trigger release workflow
RW->>T: Start translations job (checkout, setup Python 3.11, install dependencies)
T->>R: Sync translations and commit changes to dev branch
T-->>RW: Translations job complete
RW->>PA: Start publish_alpha job (dependency on translations fulfilled)
PA->>R: Execute publishing process (e.g., publish to PyPI)
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
some utterances are not sent to common query when they should, expand the voc for the short-circuit check so more utterances are caught
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
scripts/sync_translations.py (1)
1-3
: TODO comment in script header is outdated.The TODO comment "this script should run in every PR originated from @gitlocalize-app" followed by "TODO - before PR merge" appears to be outdated since you've now automated this in the workflow.
Consider updating the script header to reflect the current usage:
-"""this script should run in every PR originated from @gitlocalize-app -TODO - before PR merge +"""Script to synchronize translations from the translations directory to the locale directory. +Used in the GitHub Actions workflow to ensure translations are up-to-date before release. """
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (11)
.github/workflows/build_tests.yml
(1 hunks).github/workflows/install_tests.yml
(1 hunks).github/workflows/license_tests.yml
(1 hunks).github/workflows/publish_stable.yml
(1 hunks).github/workflows/release_workflow.yml
(2 hunks).github/workflows/sync_tx.yml
(0 hunks)ovos_commonqa/locale/ca-es/QuestionWord.voc
(1 hunks)ovos_commonqa/locale/en-us/QuestionWord.voc
(1 hunks)scripts/sync_translations.py
(5 hunks)translations/ca-es/vocabs.json
(1 hunks)translations/en-us/vocabs.json
(1 hunks)
💤 Files with no reviewable changes (1)
- .github/workflows/sync_tx.yml
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/publish_stable.yml
27-27: the runner of "actions/setup-python@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
.github/workflows/release_workflow.yml
15-15: the runner of "actions/checkout@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
20-20: the runner of "actions/setup-python@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🔇 Additional comments (28)
.github/workflows/license_tests.yml (1)
19-19
: Python version updated to 3.11The change from Python 3.8 to 3.11 aligns with the modernization effort across all workflow files in this PR. This ensures that the license tests run on a more recent Python version.
.github/workflows/build_tests.yml (1)
16-16
: Python version updated to 3.11The change from Python 3.8 to 3.11 is consistent with the updates made in other workflow files. This standardization helps maintain consistency across CI/CD processes.
ovos_commonqa/locale/en-us/QuestionWord.voc (2)
1-8
: Enhanced question vocabularyThe additions to the vocabulary file expand the system's ability to recognize various question forms and informational requests. These new entries will help improve intent recognition for information-seeking queries.
Also applies to: 10-12, 14-14
18-18
: Confirmed entry: "where"The entry "where" is marked as a change, but based on the surrounding context it appears to have been in the original file as well. This might just be a formatting change or reordering in the file.
.github/workflows/publish_stable.yml (2)
24-24
: Branch reference changed from dev to masterThe checkout reference has been updated from 'dev' to 'master', which aligns with the branch specified for publishing in line 12. This ensures consistency in the workflow.
29-29
: Python version updated to 3.11The Python version has been updated from 3.8 to 3.11, consistent with the similar changes in other workflow files in this PR.
.github/workflows/install_tests.yml (1)
14-14
: Python version matrix reduced to newer versions.The matrix has been updated to only include Python 3.10 and 3.11, removing support for older Python versions. This change aligns with the direction of using more recent Python versions across workflows.
translations/en-us/vocabs.json (3)
8-10
: Added basic question words.The addition of "which", "whose", and "where" completes the set of common question words, improving the vocabulary coverage.
13-19
: Enhanced search-related question phrases.Added phrases related to information retrieval like "search for", "information about", etc. These additions will help in recognizing more natural language patterns for queries.
20-24
: Added common question prefixes.The new entries like "explain", "can you", "can it", etc., cover common conversational question patterns, making the intent recognition more robust.
translations/ca-es/vocabs.json (2)
9-9
: Simplified Catalan explanation phrase.Changed from "explica'm sobre" to just "explica'm", which is more natural in Catalan and aligns with common usage patterns.
12-23
: Expanded Catalan question vocabulary.Added numerous question forms and informational phrases in Catalan, significantly enhancing the natural language understanding capabilities for Catalan speakers.
.github/workflows/release_workflow.yml (3)
11-37
: Added new translations synchronization job.This new job ensures translations are properly synced before the release process, which improves the consistency of multilingual support.
Outdated GitHub Actions versions detected:
actions/checkout@v2
(line 15)actions/setup-python@v1
(line 20)Please consider updating to the latest versions for improved reliability and security:
- uses: actions/checkout@v2 + uses: actions/checkout@v3- uses: actions/setup-python@v1 + uses: actions/setup-python@v4🧰 Tools
🪛 actionlint (1.7.4)
15-15: the runner of "actions/checkout@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
20-20: the runner of "actions/setup-python@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
39-39
: Made publish_alpha dependent on translations job.Good workflow sequencing - ensuring translations are synchronized before publishing the alpha version.
78-78
: Updated Python version to 3.11.Consistent with the overall change to use Python 3.11 throughout the workflows.
scripts/sync_translations.py (6)
8-9
: Added utility imports for enhanced text processing.The imports from
ovos_utils
provide template expansion and list manipulation functions that will improve the translation processing capabilities.
26-27
: Improved sample processing for intents.Enhanced the sample processing to:
- Expand templates using
expand_template
- Flatten nested lists resulting from expansion
- Remove duplicates with
deduplicate_list
- Properly handle "[UNUSED]" markers
This significantly improves the quality and consistency of the processed translation data.
28-32
: Added proper path handling for intents files.This improvement correctly handles file paths that start with "/" by ensuring the appropriate path construction and creates any necessary parent directories with
os.makedirs()
.
41-47
: Applied the same processing improvements to dialogs.Consistently applying the same template expansion, flattening, deduplication, and path handling improvements to dialog files ensures uniform processing across all translation types.
56-62
: Applied the same processing improvements to vocabulary files.Consistently applying the same template expansion, flattening, deduplication, and path handling improvements to vocabulary files ensures uniform processing across all translation types.
71-77
: Applied the same processing improvements to regex files.Consistently applying the same template expansion, flattening, deduplication, and path handling improvements to regex files ensures uniform processing across all translation types.
ovos_commonqa/locale/ca-es/QuestionWord.voc (7)
1-1
: Great addition of new question phrase!Adding "busca informació" (search information) enhances the vocabulary for question detection in Catalan.
3-4
: Good expansion of question phrases!The additions of "com funciona" (how it works) and "d'on ve" (where it comes from) are valuable for capturing more question patterns in Catalan.
6-6
: Simplified phrase makes sense.Changing from "explica'm sobre" to just "explica'm" streamlines the phrase while maintaining its functionality as a question indicator.
7-9
: Great location-related question phrases!The additions of "on es troba" (where it is located), "on puc trobar" (where can I find), and "per on passa" (where does it pass through) provide important variations for location-based questions.
16-16
: Good data-inquiry phrase addition!"quines dades tenim" (what data do we have) is a useful addition for data-related inquiries.
18-22
: Excellent expansion of 'què' variants!The additions of multiple "què" variants ("què diu", "què en sabem", "què hi ha sobre", "què opina", "què és") significantly enhance the ability to recognize different types of "what" questions in Catalan.
24-25
: Good structural additions!The "pregunta" entry has been retained, and the addition of "sobre" (about) as a separate entry provides flexibility in question pattern matching.
@@ -21,12 +21,12 @@ jobs: | |||
steps: | |||
- uses: actions/checkout@v2 | |||
with: | |||
ref: dev | |||
ref: master | |||
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. | |||
- name: Setup Python | |||
uses: actions/setup-python@v1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update actions/setup-python to a newer version
The current runner actions/setup-python@v1
is flagged as too old by the static analysis tools. Consider upgrading to a more recent version (e.g., v4) to ensure continued compatibility with GitHub Actions.
- uses: actions/setup-python@v1
+ uses: actions/setup-python@v4
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
uses: actions/setup-python@v1 | |
uses: actions/setup-python@v4 |
🧰 Tools
🪛 actionlint (1.7.4)
27-27: the runner of "actions/setup-python@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
* Merge pull request #36 from daniferlop/dev Galician translation * Intents (#37) * fix: improve matching based on gathered open data some utterances are not sent to common query when they should, expand the voc for the short-circuit check so more utterances are caught * fix: improve matching based on gathered open data some utterances are not sent to common query when they should, expand the voc for the short-circuit check so more utterances are caught * fix: improve matching based on gathered open data some utterances are not sent to common query when they should, expand the voc for the short-circuit check so more utterances are caught * Increment Version to 1.1.1a1 * Update Changelog * Fix/galician (#39) * fix: galician * fix: galician * Increment Version to 1.1.1a2 * Update Changelog --------- Co-authored-by: daniferlop <[email protected]> Co-authored-by: JarbasAI <[email protected]> Co-authored-by: JarbasAl <[email protected]>
Summary by CodeRabbit
New Features
Chores
Refactor