Skip to content

Commit

Permalink
Merge pull request #63 from OpenVoiceOS/release-1.1.8a1
Browse files Browse the repository at this point in the history
Release 1.1.8a1
  • Loading branch information
JarbasAl authored Jan 30, 2025
2 parents 3ad72d8 + 26df1ff commit 3e6e910
Show file tree
Hide file tree
Showing 15 changed files with 37 additions and 42 deletions.
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Changelog

## [1.1.7a1](https://github.com/OpenVoiceOS/ovos-ocp-pipeline-plugin/tree/1.1.7a1) (2025-01-25)
## [1.1.8a1](https://github.com/OpenVoiceOS/ovos-ocp-pipeline-plugin/tree/1.1.8a1) (2025-01-30)

[Full Changelog](https://github.com/OpenVoiceOS/ovos-ocp-pipeline-plugin/compare/1.1.6...1.1.7a1)
[Full Changelog](https://github.com/OpenVoiceOS/ovos-ocp-pipeline-plugin/compare/1.1.7...1.1.8a1)

**Merged pull requests:**

- fix: syntax error in catalan [\#60](https://github.com/OpenVoiceOS/ovos-ocp-pipeline-plugin/pull/60) ([JarbasAl](https://github.com/JarbasAl))
- fix:locale\_matching [\#62](https://github.com/OpenVoiceOS/ovos-ocp-pipeline-plugin/pull/62) ([JarbasAl](https://github.com/JarbasAl))



Expand Down
3 changes: 1 addition & 2 deletions ocp_pipeline/locale/it-it/ASMRKeyword.voc
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
ASMR
[UNUSED]
ASMR
1 change: 0 additions & 1 deletion ocp_pipeline/locale/it-it/ComicBookKeyword.voc
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
[UNUSED]
fumetto
fumetto
1 change: 0 additions & 1 deletion ocp_pipeline/locale/it-it/MusicKeyword.voc
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[UNUSED]
canzone
colonna sonora
musica
2 changes: 0 additions & 2 deletions ocp_pipeline/locale/it-it/audio_only.voc
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
[UNUSED]
[UNUSED]
no video
solo audio
solo suono
2 changes: 0 additions & 2 deletions ocp_pipeline/locale/it-it/featured.intent
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
[UNUSED]
[UNUSED]
1 change: 0 additions & 1 deletion ocp_pipeline/locale/pt-pt/MovieKeyword.voc
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
[UNUSED]
filme
1 change: 0 additions & 1 deletion ocp_pipeline/locale/pt-pt/MusicKeyword.voc
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[UNUSED]
banda sonora
canção
musica
4 changes: 3 additions & 1 deletion ocp_pipeline/locale/pt-pt/NewsKeyword.voc
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
noticias
noticiário
notícias
telejornal
4 changes: 2 additions & 2 deletions ocp_pipeline/locale/pt-pt/play.intent
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
(Procura|pesquisa) {query} multimédia
(Toca|reproduz|põe a dar) {query}
(Procura[r]|pesquisa[r]) {query} multimédia
(Toca[r]|reproduz[ir]|(põe|pôr) [a dar]) {query}
34 changes: 17 additions & 17 deletions ocp_pipeline/opm.py
Original file line number Diff line number Diff line change
Expand Up @@ -711,19 +711,7 @@ def voc_match_media(self, query: str, lang: str, valid_labels: Optional[List[Med
valid_labels = valid_labels or [m for m, s in self.media2skill.items() if s] or list(MediaType)
# simplistic approach via voc_match, works anywhere
# and it's easy to localize, but isn't very accurate
if MediaType.MUSIC in valid_labels and self.voc_match(query, "MusicKeyword", lang=lang):
# NOTE - before movie to handle "{movie_name} soundtrack"
return MediaType.MUSIC, 0.6
elif any([s in valid_labels for s in [MediaType.MOVIE, MediaType.SHORT_FILM, MediaType.SILENT_MOVIE, MediaType.BLACK_WHITE_MOVIE]]) and \
self.voc_match(query, "MovieKeyword", lang=lang):
if MediaType.SHORT_FILM in valid_labels and self.voc_match(query, "ShortKeyword", lang=lang):
return MediaType.SHORT_FILM, 0.7
elif MediaType.SILENT_MOVIE in valid_labels and self.voc_match(query, "SilentKeyword", lang=lang):
return MediaType.SILENT_MOVIE, 0.7
elif MediaType.BLACK_WHITE_MOVIE in valid_labels and self.voc_match(query, "BWKeyword", lang=lang):
return MediaType.BLACK_WHITE_MOVIE, 0.7
return MediaType.MOVIE, 0.6
elif MediaType.DOCUMENTARY in valid_labels and self.voc_match(query, "DocumentaryKeyword", lang=lang):
if MediaType.DOCUMENTARY in valid_labels and self.voc_match(query, "DocumentaryKeyword", lang=lang):
return MediaType.DOCUMENTARY, 0.6
elif MediaType.AUDIOBOOK in valid_labels and self.voc_match(query, "AudioBookKeyword", lang=lang):
return MediaType.AUDIOBOOK, 0.6
Expand All @@ -735,15 +723,27 @@ def voc_match_media(self, query: str, lang: str, valid_labels: Optional[List[Med
return MediaType.CARTOON, 0.6
elif MediaType.PODCAST in valid_labels and self.voc_match(query, "PodcastKeyword", lang=lang):
return MediaType.PODCAST, 0.6
elif MediaType.TV in valid_labels and self.voc_match(query, "TVKeyword", lang=lang):
return MediaType.TV, 0.6
elif MediaType.VIDEO_EPISODES in valid_labels and self.voc_match(query, "SeriesKeyword", lang=lang):
return MediaType.VIDEO_EPISODES, 0.6
elif MediaType.RADIO_THEATRE in valid_labels and self.voc_match(query, "AudioDramaKeyword", lang=lang):
# NOTE - before "radio" to allow "radio theatre"
return MediaType.RADIO_THEATRE, 0.6
elif MediaType.RADIO in valid_labels and self.voc_match(query, "RadioKeyword", lang=lang):
return MediaType.RADIO, 0.6
elif MediaType.MUSIC in valid_labels and self.voc_match(query, "MusicKeyword", lang=lang):
# NOTE - before movie to handle "{movie_name} soundtrack"
return MediaType.MUSIC, 0.6
elif MediaType.TV in valid_labels and self.voc_match(query, "TVKeyword", lang=lang):
return MediaType.TV, 0.6
elif MediaType.VIDEO_EPISODES in valid_labels and self.voc_match(query, "SeriesKeyword", lang=lang):
return MediaType.VIDEO_EPISODES, 0.6
elif any([s in valid_labels for s in [MediaType.MOVIE, MediaType.SHORT_FILM, MediaType.SILENT_MOVIE, MediaType.BLACK_WHITE_MOVIE]]) and \
self.voc_match(query, "MovieKeyword", lang=lang):
if MediaType.SHORT_FILM in valid_labels and self.voc_match(query, "ShortKeyword", lang=lang):
return MediaType.SHORT_FILM, 0.7
elif MediaType.SILENT_MOVIE in valid_labels and self.voc_match(query, "SilentKeyword", lang=lang):
return MediaType.SILENT_MOVIE, 0.7
elif MediaType.BLACK_WHITE_MOVIE in valid_labels and self.voc_match(query, "BWKeyword", lang=lang):
return MediaType.BLACK_WHITE_MOVIE, 0.7
return MediaType.MOVIE, 0.6
elif MediaType.VISUAL_STORY in valid_labels and self.voc_match(query, "ComicBookKeyword", lang=lang):
return MediaType.VISUAL_STORY, 0.4
elif MediaType.GAME in valid_labels and self.voc_match(query, "GameKeyword", lang=lang):
Expand Down
4 changes: 2 additions & 2 deletions ocp_pipeline/version.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# START_VERSION_BLOCK
VERSION_MAJOR = 1
VERSION_MINOR = 1
VERSION_BUILD = 7
VERSION_ALPHA = 0
VERSION_BUILD = 8
VERSION_ALPHA = 1
# END_VERSION_BLOCK
8 changes: 4 additions & 4 deletions scripts/sync_translations.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
data = json.load(f)
for fid, samples in data.items():
if samples:
samples = [s for s in samples if s] # s may be None
samples = [s for s in samples if s and s != "[UNUSED]"] # s may be None
with open(f"{locale}/{lang.lower()}/{fid}", "w") as f:
f.write("\n".join(sorted(samples)))

Expand All @@ -30,7 +30,7 @@
data = json.load(f)
for fid, samples in data.items():
if samples:
samples = [s for s in samples if s] # s may be None
samples = [s for s in samples if s and s != "[UNUSED]"] # s may be None
with open(f"{locale}/{lang.lower()}/{fid}", "w") as f:
f.write("\n".join(sorted(samples)))

Expand All @@ -39,7 +39,7 @@
data = json.load(f)
for fid, samples in data.items():
if samples:
samples = [s for s in samples if s] # s may be None
samples = [s for s in samples if s and s != "[UNUSED]"] # s may be None
with open(f"{locale}/{lang.lower()}/{fid}", "w") as f:
f.write("\n".join(sorted(samples)))

Expand All @@ -48,7 +48,7 @@
data = json.load(f)
for fid, samples in data.items():
if samples:
samples = [s for s in samples if s] # s may be None
samples = [s for s in samples if s and s != "[UNUSED]"] # s may be None
with open(f"{locale}/{lang.lower()}/{fid}", "w") as f:
f.write("\n".join(sorted(samples)))

4 changes: 2 additions & 2 deletions translations/pt-pt/intents.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"play.intent": [
"(Toca|reproduz|põe a dar) {query}",
"(Procura|pesquisa) {query} multimédia"
"(Toca[r]|reproduz[ir]|(põe|pôr) [a dar]) {query}",
"(Procura[r]|pesquisa[r]) {query} multimédia"
],
"like_song.intent": [
"Eu gosto (disto|deste|desta|disso)",
Expand Down
4 changes: 3 additions & 1 deletion translations/pt-pt/vocabs.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
"(apenas|só) som"
],
"NewsKeyword.voc": [
"noticias"
"notícias",
"noticiário",
"telejornal"
],
"GameKeyword.voc": [
"jogo"
Expand Down

0 comments on commit 3e6e910

Please sign in to comment.