@
mcl22, there is indeed some upper limit to the size/complexity of a skill. Unfortunately, Amazon hasn't really defined (publicly, from what I can tell) what that is.
As you're discovering, it doesn't appear to be a pure character limit on the input forms either. For instance, you can easily make this fail by adding a few more slot references to intents. In the form, this amounts to just a few chacracters, but I'm assuming they're generating a code blob from this input and probably making a copy of the slot each time it's referenced.
(2017-05-16, 14:13)mcl22 Wrote: What works is if I trimm all slots down to 100 entries. But then the skill doesn't work realiably any more. For instance "STS" becomes "Faithless" and so on. Of course I could manually add "STS" but I guess I would then run into other similar problems with other artists, albums and so on.
The album recognition btw isn't really good with 100 entries for me.
Custom slots will only allow the literal, unmatched string through if the size of the slot exceeds a certain number. Again, Amazon won't tell us precisely what this number is, but it appears to be ~200 items. If the slot contains this magic number of items, it will convert to what Amazon calls a "generic slot." This allows unmatched strings to be passed through to the skill literally.
In the context of our skill, the reason it feels unreliable to you without 'generic slots' is that we do our own fuzzy matching in the skill. This code will never execute if Amazon doesn't pass the literal string through, so you're getting matching
only on the items you've put into your slot.
(2017-05-16, 14:13)mcl22 Wrote: So I remembered your words that it works for you. So I tried to use all 300 items for the MUSICALBUMS and then change the utterances from german to the english ones. And it worked!
This is one of the bigger issues with maintaining translations for Alexa skills. The translators need to have a pretty decent understanding of the rest of the code in order to avoid issues like this.. or the primary authors need to have an understanding of the language in question (German, here).
From my own experience, I don't believe the issue here is the raw character count in the utterances.. as you've discovered:
(2017-05-16, 14:13)mcl22 Wrote: Then I thought perhaps there's some kind of character limit or value limit as the german utterances have over 300 more entries. So I trimmed them down to ~ 1000. Didn't work.
Then I thought perhaps it's really about the amount of characters because the german sentences are longer. I counted the characters and trimmed the german utterances down to some almost equal value (~44000, the english ones have about 48k). But also that didn't work.
So I decided to try 300 utterances, 400, 500. Works! 600 don't. 550 worked.
And as that wouldn't be wired enough: I trimmed them down in some sensefull way and came up with 500 utterances. Copy paste - doesn't work!!!
If I just take the first 550 lines of my already trimmed (to ca. 1000 entries) german utterances, I can save and it's all ok. But if I take only 500 utterances from my more trimmed german sample, it doesn't. If I take only the entries that are identical in both utterances files (316pcs) I can save. If I only take the rest (184pcs) I can also save. If I combine them and take the whole 500 it doesn't work.
Welcome to many of my evenings fighting the web interface for this for hours on end..
Unfortunately, I don't really have an answer for you, though.
There are two things that come to mind,
1) For German, each character is twice as big as it is for English. The English version of ASK only supports ASCII, whereas for German it supports UTF-8, which stores each character in two bytes. This effectively makes the storage size for utterances (and maybe other things, perhaps indirectly) larger by default for German,
2) There might be a collision in the German utterances; that is, two (or more) unrelated phrases that are not unique enough to be distinguished by ASK and refer to two different slots.
#2 is likely it considering the other testing you've done trimming the utterances down. Unfortunately, this means a ton of trial-and-error testing for me as I personally know absolutely no German.. and more annoyingly, for this particular problem, you have to wait for the stupid interface to time out to continue on :/
If you're up for it, one thing I'd like you to try is to cut every utterance that refers to a slot (you'll see a string within curly braces, those are slot references) down to one utterance. For example:
Code:
AddonExecute führe add on {Addon} aus
AddonExecute führe addon {Addon} aus
AddonExecute führe erweiterung {Addon} aus
AddonExecute führe plug in {Addon} aus
AddonExecute führe plugin {Addon} aus
AddonExecute führe script {Addon} aus
AddonExecute führe {Addon} aus
AddonExecute öffne {Addon}
becomes something like:
Code:
AddonExecute führe add on {Addon} aus
If you need me to generate a file for you like this, just let me know.
But the idea is, if this works, it would then be a matter of adding the additional lines back in section-by-section until it fails again, which would hopefully help narrow down the conflict.