【发布时间】:2023-04-01 20:16:01
【问题描述】:
假设我有三个模型/表:operating_systems、words 和 programming_languages:
# operating_systems
name:string created_by:string family:string
Windows Microsoft MS-DOS
Mac OS X Apple UNIX
Linux Linus Torvalds UNIX
UNIX AT&T UNIX
# words
word:string defenitions:string
window (serialized hash of defenitions)
hello (serialized hash of defenitions)
UNIX (serialized hash of defenitions)
# programming_languages
name:string created_by:string example_code:text
C++ Bjarne Stroustrup #include <iostream> etc...
HelloWorld Jeff Skeet h
AnotherOne Jon Atwood imports 'SORULEZ.cs' etc...
当用户搜索hello时,系统会显示'hello'的定义。这相对容易实现。但是,当用户搜索UNIX 时,引擎必须选择:word 或operating_system。此外,当用户搜索windows(小写字母'w')时,引擎会选择word,但也应该显示Assuming 'windows' is a word. Use as an <a href="etc..">operating system</a> instead。
谁能通过解析和选择搜索查询的主题为我指明正确的方向?谢谢。
注意:它不需要像 WA 那样能够执行计算。
【问题讨论】:
标签: ruby-on-rails parsing prediction wolframalpha