博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
搜索常用到的“Do you mean"功能的算法(收藏)
阅读量:6073 次
发布时间:2019-06-20

本文共 1290 字,大约阅读时间需要 4 分钟。

hot3.png

文章来自:

Have you always wanted your very own (FST) but you couldn't figure out how to use Lucene's crazy APIs?
Then today is your lucky day! I just built a that creates an FST from the input/output strings that you enter.
If you just want a finite state automaton (no outputs) then enter only inputs, such as :
If all of your outputs are then the FST will use numeric outputs, where you sum up the outputs as you traverse a path to get the final output:
Finally, if the outputs are then they are treated as strings, in which case you concatenate as you traverse the path:
The red arcs are the ones with the NEXT optimization: these arcs do not store a pointer to a node because their to-node is the very next node in the FST. This is a good optimization: it generally results in . The bolded arcs tell you the next node is final; this is most interesting when a prefix of another input is accepted, such as :
Here the "r" arc is bolded, telling you that "star" is accepted. Furthermore, that node following the "r" arc has a final output, telling you the overall output for "star" is "abc".
The web app is a simple Python WSGI app; source code is . It invokes a simple Java tool as a subprocess; source code (including generics violations!) is .

转载于:https://my.oschina.net/dancing/blog/159633

你可能感兴趣的文章
学习O/RM,从最简单的例子开始...之四(2)
查看>>
Use JD-Eclipse to as your decompile tool in eclipse
查看>>
在Domin里新建文件夹代码
查看>>
零成本实现Web性能测试:基于Apache JMeter
查看>>
第三章 AOP 编程选择
查看>>
小白学数据分析----->DNU/DAU
查看>>
架构的本质(转)
查看>>
HDU 4612 Warm up tarjan 树的直径
查看>>
Java实现图片压缩代码,图片大小转换
查看>>
轻取帝国CMS管理员密码
查看>>
转:NetBeans的远程Linux C开发实践
查看>>
ScrollView拉到尽头时出现阴影的解决方法
查看>>
请允许我转载一篇关于套接字的博客:Socket
查看>>
wamp配置步骤
查看>>
JS - 点击事件排除父级标签
查看>>
Ubuntu 14.04 更新gcc版本至4.9.2
查看>>
启发录-打造用户喜爱的产品
查看>>
Mac/win eclipse genymotion 插件下载地址
查看>>
[LeetCode]Single Number 异或的妙用
查看>>
使用go语言解析xml
查看>>