as title says, api.ai removes dots from parameters.
For example if I write "bla bla bla google.com" where "google.com" is mapped to a parameter, the value of that parameter is "google com" and I don't find how to solve this problem. I also wrote to the api.ai team without an answer for now.
Any help is appreciated! Thank you!
I found the solution, thanks to api.ai team.
Special symbols such as dots are removed from the resolved value.
To obtain value with dot you can:
use #sys.url for URL inputs in this case "google.com" will be returned with dot
create additional parameter and set $parameterName.original -> for this parameter you will get exact phrase entered by user including
dots and other special symbols.
You can find the documentation about this here https://docs.api.ai/docs/concept-actions#section-extracting-original-value
In my case:
I mark this answer for other people with same problem.
Related
I have an existing email address validation Regex and am looking for an additional Regex function that will also NOT match if the sample ends with .ocm.
The reason for this request is to provide additional data entry validation to prevent the most common typo we encounter: .ocm instead of .com.
For example, blah#somewhere.com should return a match, but blah#somewhere.ocm should not.
I'm afraid I don't know what flavor of Regex I'm using, as it's in a black box proprietary application that "accepts Regex" for user input validation. I do know that the application is probably written in VB6 if that helps at all.
Here is the existing Regex, which works well for its intended purpose:
^(?=[a-zA-Z0-9][a-zA-Z0-9#._%+-]{5,253}$)[a-zA-Z0-9#._%+-]{1,64}#(?:(?=[a-zA-Z0-9-]{1,63}\.)[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*\.){1,8}[a-zA-Z]{2,63}$
The sample will always be a greater-than-zero-length string, so it doesn't matter if these aren't handled.
It seems that a negative lookbehind at the end of the Regex should be the best method, but I can't find the correct syntax to make this work with my existing Regex.
Here are some methods that might work if someone could kindly suggest how to integrate them with my existing Regex:
https://stackoverflow.com/a/406408/6195684
https://code.i-harness.com/en/q/fa3887
https://stackoverflow.com/a/11432373/6195684
Thanks kindly in advance.
Just add a negative lookahead as shown below:
(?!.*[.]ocm$)
This is the original regex.
This is the modified regex.
My app is downloading eMails from a POP3 server. But it receives "strange" subject lines. I see there is a pattern of coding in there. But what exactly is that coding? What do I google for if I want cover the parsing of lines like that?
=?utf-8?Q?HMS=20will=20no=20longer=20provide=20Netbiter=20SIM=2Dcards?=
The eMail header is:
Subject: =?utf-8?Q?HMS=20will=20no=20longer=20provide=20Netbiter=20SIM=2Dcards?=
So I know it's coded by the sender. Also this is just one of many header lines, which all seem to be valid. The subject is obviously HMS will no longer provide Netbiter SIM-cards after you replace "=20" with spaces and all the other stuff. The eMail is just a notification from a supplier.
**Found it myself:** [RFC 2047][1]
I don't remember exactly but i have experienced a issue like this before. If the subject is greater than some length of character (which i think is 75 chars) then subject will not be parsed properly.
This used to be a problem in codeIgniter (I don't use it now, so don't know the current status of this issue)
To resolve this issue you might have to change your email config.
There might be other reasons for this issue but i think this is because you have more characters in your subject.
The Azure search api offers a fuzzy paramter for suggestions. like this:
https://blssuggestions.search.windows.net/indexes/cities/docs/suggest?api-version=2015-02-28&suggesterName=default&fuzzy=true&search=berlen
Would return "Berlin" as a result of berlen.
I can't find a documentation about this how to activate it in a normal search
setting there fuzzy = true seems to not change anything
https://blssuggestions.search.windows.net/indexes/cities/docs?api-version=2015-02-28&search=berlen&fuzzy=true
[Update]: Please see the other responsed about using querytype=full as this response is no longer correct.
This is correct. Fuzzy search is only available currently in the suggestions api.
You need to call:
https://blssuggestions.search.windows.net/indexes/cities/docs/suggest?api-version=2015-02-28&suggesterName=default&queryType=full&search=berlen~
You were missing querytype=full and the tilde after the character that you want to execute fuzzy searches on.
This is now in the preview version of the api:
https://{yourSite}.search.windows.net/indexes/{yourIndex}/docs?search={fieldToSearch}:{lookupValue}~&queryType=Full&api-version=2015-02-28-preview
Note the ~ and queryType=Full, both of which are required to force fuzzy matching.
Documentation is here:
https://msdn.microsoft.com/library/azure/mt589323.aspx
CAVEAT: The fuzzy search is very fuzzy! i.e. dog will match any 3 letter word with only a single matched letter - dim, now, bag
I am trying to figure out how to tune and tweak but as it is still in preview the documentation is sparse.
UPDATE: I just re-read the documentation and it has since been updated with details of an optional distance parameter. I will investigate.
i'm very aware that this is probably not a stackoverflow question, but i figure someone here might know the answer...
a few months back i was sent an image detailing a neat method for spam prevention using a little known feature of gmail..
basically you can use a specific syntax in your email address when you give it out to include some kind of identifier within the email address so you can later distinguish which version of your email address was distributed/crawled to create spam and then, if you want, create filters based on this identifier.
something along the lines of username|identifier#gmail.com which will still beforewarded to username#gmail.com except | is not the correct token and i can't find the doco where i found this information or remember what the correct special character is.
so if anyone knows about the feature i'm describing, i'd love to find out how to get it to work!
thanks, and sorry for the non-programming question.
p.
Use a + sign instead of the |
I see this behavior from time to time where a site's URL will be in all capital letters when linked from the navigation. The site's name is not all caps, and the URL is properly cased in most situations. The all uppercase treatment appears to come and go, and is not related to anything. Has anyone else seen it or know how to stop it from happening?
I've just looked into this myself. It's part of the internal caching; sharepoint converts part of the links to uppercase to make the comparison case insensitive. As far as I can tell there's nothing you can do about it.
http://support.microsoft.com/kb/953457
Check the welcome page setting for the site - that's where the link used in navigation comes from.
I have seen it... my development team caused it when they created a custom navigation provider and needed to check values in the URL. They converted the URL to all uppercase to make the string finds easier.