t***q 发帖数: 418 | 1 如题,要建一个 web service, 有 query string 的功能。主要是,有一个 影视作品
的title 进来,用 web service 里的 一些function, 和已有的一个 flat file, 那个
flat file里,有许多影视作品的 title , 及其他一些信息, 用这个 flat file, 和
已输入的 title, 算出与之最相似的影视作品的title, 然后 call 相关 url 后, 能
有一个 hash table 输出, 其中有最相近的 title , 和 相似率, 一个类似
confidence level 的东西。
例子如下:
http://www.dreamsyssoft.com/python-scripting-tutorial/create-si
现在就是不知道如何把query string , 还有算 相似度的function 加进去。其实自己
也不知道这个例子到底有没有用,对这个问题。谁能说说?还有就是哪位能给个 web
service 用 query string的标准的例子,链接之类的。多谢! |
W***o 发帖数: 6519 | 2 我觉得你这个不难啊
两步吧:
1. string/title similarity measurement
2. if found the similar title, do a POST query to your REST api, get the
returned results
or if you mean this?
POST your title to the url for query, the server will run some similarity
measurement algorithms in your flat file. Then return results
和
【在 t***q 的大作中提到】 : 如题,要建一个 web service, 有 query string 的功能。主要是,有一个 影视作品 : 的title 进来,用 web service 里的 一些function, 和已有的一个 flat file, 那个 : flat file里,有许多影视作品的 title , 及其他一些信息, 用这个 flat file, 和 : 已输入的 title, 算出与之最相似的影视作品的title, 然后 call 相关 url 后, 能 : 有一个 hash table 输出, 其中有最相近的 title , 和 相似率, 一个类似 : confidence level 的东西。 : 例子如下: : http://www.dreamsyssoft.com/python-scripting-tutorial/create-si : 现在就是不知道如何把query string , 还有算 相似度的function 加进去。其实自己 : 也不知道这个例子到底有没有用,对这个问题。谁能说说?还有就是哪位能给个 web
|
t***q 发帖数: 418 | 3 多谢,就一个post query这么简单吗?我也觉得不会很难。
主要就是要仿照那个例子,还是你觉得没必要。我install 了, web.py :
http://webpy.org/cookbook/restful_doctesting_using_request
然后,那个例子里还有一个 xml file,总之,最后希望 打开那个url 后,希望有一个
hash table, 例如用了如下命令后:
links http://localhost:8080/app?field1=sometitle
能打开这样一个file:
{"matched title": "XXXX", "confidence level": 0.95}
这样一个hash table
我用的是linux。
请问要实现这样的东西,有多难。多谢!
【在 W***o 的大作中提到】 : 我觉得你这个不难啊 : 两步吧: : 1. string/title similarity measurement : 2. if found the similar title, do a POST query to your REST api, get the : returned results : or if you mean this? : POST your title to the url for query, the server will run some similarity : measurement algorithms in your flat file. Then return results : : 和
|
W***o 发帖数: 6519 | 4 post query 就是让用户发送一个查询命令到服务器上,你服务器上执行搜索,返回结
果而已
我对python不是很熟
个
【在 t***q 的大作中提到】 : 多谢,就一个post query这么简单吗?我也觉得不会很难。 : 主要就是要仿照那个例子,还是你觉得没必要。我install 了, web.py : : http://webpy.org/cookbook/restful_doctesting_using_request : 然后,那个例子里还有一个 xml file,总之,最后希望 打开那个url 后,希望有一个 : hash table, 例如用了如下命令后: : links http://localhost:8080/app?field1=sometitle : 能打开这样一个file: : {"matched title": "XXXX", "confidence level": 0.95} : 这样一个hash table : 我用的是linux。
|
t***q 发帖数: 418 | 5 哦,多谢!
【在 W***o 的大作中提到】 : post query 就是让用户发送一个查询命令到服务器上,你服务器上执行搜索,返回结 : 果而已 : 我对python不是很熟 : : 个
|
t***q 发帖数: 418 | |
t***q 发帖数: 418 | 7 我觉得是要把这个例子,和我帖子里的那个例子结合起来。找到一个方法。但现在还是
不明白。
【在 t***q 的大作中提到】 : http://chimera.labs.oreilly.com/books/1230000000393/ch11.html#_ : I think this may help. not sure.
|
b*******g 发帖数: 603 | 8 elastic search.
和
【在 t***q 的大作中提到】 : 如题,要建一个 web service, 有 query string 的功能。主要是,有一个 影视作品 : 的title 进来,用 web service 里的 一些function, 和已有的一个 flat file, 那个 : flat file里,有许多影视作品的 title , 及其他一些信息, 用这个 flat file, 和 : 已输入的 title, 算出与之最相似的影视作品的title, 然后 call 相关 url 后, 能 : 有一个 hash table 输出, 其中有最相近的 title , 和 相似率, 一个类似 : confidence level 的东西。 : 例子如下: : http://www.dreamsyssoft.com/python-scripting-tutorial/create-si : 现在就是不知道如何把query string , 还有算 相似度的function 加进去。其实自己 : 也不知道这个例子到底有没有用,对这个问题。谁能说说?还有就是哪位能给个 web
|
d******e 发帖数: 2265 | 9 你这样做,用户要等半天的
【在 W***o 的大作中提到】 : 我觉得你这个不难啊 : 两步吧: : 1. string/title similarity measurement : 2. if found the similar title, do a POST query to your REST api, get the : returned results : or if you mean this? : POST your title to the url for query, the server will run some similarity : measurement algorithms in your flat file. Then return results : : 和
|
W***o 发帖数: 6519 | 10 说说好办法?把那个file 缓存到用户浏览器里,就地搜索吗?
【在 d******e 的大作中提到】 : 你这样做,用户要等半天的
|
c******f 发帖数: 243 | |
y****r 发帖数: 211 | 12 你这是某大公司某后台组某g开头的hiring manager给的题目啊? |
y****r 发帖数: 211 | 13 你提到的那个xml file可能就是我的程序生成的。我怀疑这个人把他的project分解让
interviewer做。。我们都当了免费labor。。
【在 y****r 的大作中提到】 : 你这是某大公司某后台组某g开头的hiring manager给的题目啊?
|