开发者

How can I find images to represent user text?

开发者 https://www.devze.com 2022-12-23 21:45 出处:网络
On our web site, users enter free form text like \"Ribeye steak at Safeway for $8.99.Great deal in Palo Alto.\"

On our web site, users enter free form text like "Ribeye steak at Safeway for $8.99. Great deal in Palo Alto."

Does anyone know of APIs that can take free form text and return an image that best represents the text?

Right now, we're feeding the whole text to Google Image Search, but sometimes the extraneous wo开发者_如何学运维rds (e.g., at, for, $8.99) skew the query and induce weird results.


Google spends tens of millions of dollars a year trying to improve their answer to precisely this question; it's what Image Search is all about. If you are dealing with a relatively narrow sub-domain, your best bet is to build up your own image collection to match based on known keywords.

If you still want to use Google, then you might try a hybrid approach of submitting only known keywords to them. I'd be worried about copyright and term-of-use issues, though.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号