object property with a random number appended - object

I have a problem in testcomplete where I have an object with a property that has a text string and then a random number appended (i.e. help4) This number changes per object but in no logical way, i.e. it could be help4 or it could be help18.
I'm trying to have my test search for this object but need to know how to tell it to look for help plus the random number, any ideas?
I'm new to all this so explanations in as simplistic way possible would be most helpful.
The language is CS-Script.

You need to replace the variable part of the name with the wildcard character. For example:
parent.WinFormsObject("help*").ClickButton();
If you are using Name Mapping, you need to replace the variable part of the name with the wildcard character in the mapping criteria.

Related

How to use create a Custom class to format phone number in Google Speech-to-Text api?

I'm using Google Speech-to-Text api in order to transcribe phone calls in Hebrew.
Most of the phone calls contains customers that tells their phone-number, can I make some custom class in-order to format these numbers with the correct way?
Other example can be formatting an order-id which has a specific format.
I've read this article https://cloud.google.com/speech-to-text/docs/adaptation-model#custom_classes which tells that it can be a list of items...
What is the difference between class & phrase list?
PhraseSet indeed contain field phrases which is list of Phrase objects. The object contain two fields: value and boost (reference).
Now, in field value, is the phrase itself and is string. But instead of string value you can define and use CustomClass there, which in fact is a list of phrases (reference). So it works, when you want to add the same boost value to whole list of items. Example from the documentation mentioned by you is one of the best:
For example, you want to transcribe audio data that is likely to
include the name of any one of several hundred regional restaurants
Without custom class you would have to add all hundred names with seperate boost value. Instead you can create a list of values using CustomClass and assign one boost value for all of them. Additionally CustomClass can be managed independently to PhreaseSet.

Solr exact search with a hyphen

I am trying to search for a term in Solr in the Title that contains only the string 1604-04. But the results come back with anything that contains 1604 or 04. What would the syntax be to force solr to search on the exact string of 1604-04?
You can also use Classic Tokenizer.The Classic Tokenizer preserves the same behavior as the Standard Tokenizer with the following exceptions:-
Words are split at hyphens, unless there is a number in the word, in which case the token is not split and
the numbers and hyphen(s) are preserved.
This means if someone searches for 1604-04 then this Tokenizer won't break search string into two tokens.
If you want exact matches only, use a string field or a text field with a KeywordTokenizer as the tokenizer. These will keep your tokens intact as one single entry, and won't break it up into multiple tokens.
The difference is that if you use a Textfield with a KeywordTokenizer, you can still apply other filters, such as a LowercaseFilter, while a string field will store anything verbatim without any further processing possible.
Your analyzer is splitting "1604-04" into two terms, "1604" and "04". You've received answer on how to change your analysis to stop doing that.
Changing your analysis my not be the best solution (can't be entirely sure based on what you've written). Using a phrase query would be the usual way to do this. You can use a phrase query by wrapping it in quotes:
field:"1604-04"
This will still analyze and split it into two terms, but it will look for those terms in sequence. So, that query would match "1604-04" and "1604 04", but not "1604 some other stuff 04".

Neo4j quick lookup of string within property of many nodes

I'm using neo 2.2.2 and i'm currently using Regex search to find a string in the name property over 600k nodes.
Each node is structured with a minimum of the following two properties.
{
name: 'some string of text',
sid: 12345
}
I've created an index on name and another index on sid. Lookups on sid are very fast. Searches [using regex] are very slow. Currently I'm searching for a string with a * before and after.
What can be done with neo to make searching for string within a property very fast?
If doing something special within neo is not ideal, I could theoretically standup some supplementary algorithm/service separate from Neo4j that searches for a string value within the name property, and then gives me the sid, which then is used to look up the node within neo.
Help me do fast string search with neo4j, please. :)
You can use legacy fulltext indexing to speed up your search. This blog shows you how.
In general Regexes are very expensive. From my point of view, you should find another solution for that.
Could you please tell us more about your use case and why you want to use Regex?
One solution for that you already suggest. Store SID and Name in another format (or database), which has better performance for Regex searching than Neo4j.
Or do some analysis of name property content and base on that create representation of the content as a graph.
e.g.
* Node for a count of letters in name property
* Node for starting letter
* Split name property to multiple properties
* etc...

Using Aho-Corasick, can strings be added after the initial tree is built?

I want to search for strings inside a large number of documents. I have a predefined list of strings available that I want to find in each document. Each document contains a header at the beginning followed by the text and in the header are additional strings I want to search for in the text below the header.
On each iteration of document, is it possible to add the header strings after creating the initial tree that was made from the main list? Or modify the original data structure to include the new strings?
If this is not practical to do, is there an alternative search method that would be more appropriate?
If each document has its own set of strings to search for, it seems like you could just build one global Aho-Corasick matcher and then a second, per-document matcher. Then, as you process the characters in the document, feed each into both of the matching automata and report all matches found this way. That eliminates the need to add new strings to the master automaton and to remove them when you're done. Plus, the slowdown should be pretty minimal.
Hope this helps!

Storing index values in FAST-ESP without modifications

first of all I'm totally new to FAST but I already have a couple of issues I need to solve, so I'm sorry if my questions are very basic =)
Well, the problem is that I have a field in the FAST index which in the source document is something like "ABC 12345" (please note the intentional whitespaces) but when stored in the index is in the form "ABC 123456" (please note that now there is a single space).
If I retrieve all the document values then this specific value is OK (with all the whitespaces), my only problem is with the way the value is stored in the index since I need to retrieve and display it to my user just like it appears in the original document, and I don't want to go to the full document just for this value, I want the value that I already have in the index. I think I need to update one of the FAST XML configuration files but I don't have enough documentation at hand in order to decide where to perform the change, index_profile.xml? in the XMLMapper file?
I've found the answer by myself. I'm using a XMLMapper for my collection, all I had to do was to add the ignore-whitespace attribute to the Mapping element and then set this attribute value to "false". This solved the problem and the raw data now when retrieved from the index contains the expected inner whitespaces.
Thanks.

Resources