You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the intent builder to add a new training phrase as the one shown below, the builder adds a space between the annotated part and the following part whose text starts with the possessive "'s":
"phone's not working" where "phone" is annotated with ProvidedProductLine
Expected Behavior
Adding the tp as follows:
intent_builder.add_training_phrase(["phone", "'s not working"], ["ProvidedProductLine", ""])
should result in a tp "phone's not working" where "phone" is annotated with ProvidedProductLine
Current Behavior
Adding the tp as follows:
intent_builder.add_training_phrase(["phone", "'s not working"], ["ProvidedProductLine", ""])
results in a tp "phone 's not working" where "phone" is annotated with ProvidedProductLine
Possible Solution
Check if a part starts with the possessive "'s", and, if it does, do not add a space before it. This may be true in other situations as well, for example "," and "?" (these may already be accounted for, I haven't seen them, just a thought.)
The text was updated successfully, but these errors were encountered:
@frrleone Great catch. For now this method does not take into account any special character to decide whether to add spaces or not.
Can you provide an example training phrase that includes "," and "?" ? @kmaphoenix any other characters we should be concerned about?
When using the intent builder to add a new training phrase as the one shown below, the builder adds a space between the annotated part and the following part whose text starts with the possessive "'s":
"phone's not working" where "phone" is annotated with ProvidedProductLine
Expected Behavior
Adding the tp as follows:
intent_builder.add_training_phrase(["phone", "'s not working"], ["ProvidedProductLine", ""])
should result in a tp "phone's not working" where "phone" is annotated with ProvidedProductLine
Current Behavior
Adding the tp as follows:
intent_builder.add_training_phrase(["phone", "'s not working"], ["ProvidedProductLine", ""])
results in a tp "phone 's not working" where "phone" is annotated with ProvidedProductLine
Possible Solution
Check if a part starts with the possessive "'s", and, if it does, do not add a space before it. This may be true in other situations as well, for example "," and "?" (these may already be accounted for, I haven't seen them, just a thought.)
The text was updated successfully, but these errors were encountered: