Start lmgrep process once and wait for the input from STDIN that includes both: text and the query.
Using such a technique avoids the "cold start" issues when the query is known only when the text is known.
Example:
echo '{"query": "nike~", "text": "I am selling nikee"}' | ./lmgrep --streamed --with-score --format=json --query-parser=simple
#=> {"line-number":1,"line":"I am selling nikee","score":0.09807344}
Is equivalent to:
echo "I am selling nikee" | ./lmgrep --query="nike~" --with-score --format=json --query-parser=simple
#=> {"line-number":1,"line":"I am selling nikee","score":0.09807344}
Start
lmgrep
process once and wait for the input from STDIN that includes both: text and the query. Using such a technique avoids the "cold start" issues when the query is known only when the text is known.Example:
Is equivalent to: