- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试使用 seqdef
创建一个序列对象使用 SPELL 格式。这是我的数据示例:
spell <- structure(list(ID = c(1, 3, 3, 4, 5, 5, 6, 8, 9, 10, 11, 11,
12, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15,
15, 15, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 18, 18, 18, 19,
19), status = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 2, 3, 1, 2, 3, 2, 3, 1, 1, 1, 3, 1, 3, 3, 1, 3, 1, 1, 1,
1, 1, 3, 3, 1, 3, 1, 1, 1), time1 = c(1, 1, 57, 1, 1, 91, 1,
1, 1, 1, 1, 104, 1, 1, 60, 109, 121, 1, 42, 47, 54, 64, 72, 78,
85, 116, 1, 29, 39, 69, 74, 78, 88, 1, 16, 40, 68, 1, 30, 123,
1, 39, 51, 1, 61), time2 = c(125, 57, 125, 125, 91, 125, 125,
125, 125, 125, 104, 125, 125, 60, 109, 121, 125, 42, 47, 54,
64, 72, 78, 85, 116, 125, 29, 39, 69, 74, 78, 88, 125, 16, 40,
68, 125, 30, 123, 125, 39, 51, 125, 61, 125)), .Names = c("ID",
"status", "time1", "time2"), row.names = c(NA, 45L), class = "data.frame")
spell.seq <- seqdef(data=spell, informat="SPELL", id="ID", begin="time1", end="time2",
status="status", limit=125,process=FALSE)
[>] time axis: 1 -> 125
[>] SPELL data converted into 17 STS sequences
[>] 3 distinct states appear in the data:
1 = 1
2 = 2
3 = 3
[>] state coding:
[alphabet] [label] [long label]
1 1 1 1
2 2 2 2
3 3 3 3
[>] 17 sequences in the data set
[>] min/max sequence length: 125/125
Error in `row.names<-.data.frame`(`*tmp*`, value = value) :
invalid 'row.names' length
seqformat
间接地做同样的事情,保留相同的参数,不会抛出错误:
sts <- seqformat(data=spell,from="SPELL",to="STS",
id="ID",begin="time1",end="time2",status="status",
limit=125,process=FALSE)
seqs <- seqdef(sts,right="DEL")
最佳答案
快速浏览 seqdef()
的来源为如何row.names
are set 显示它们是根据 id
的值设置的争论。
在看 ?seqdef
为 id
显示
id
optional argument for setting the rownames of the sequence object. If NULL (default), the rownames are taken from the input data. If set to "auto", sequences are numbered from 1 to the number of sequences. A vector of rownames of length equal to the number of sequences may be specified as well.
id="ID"
不符合这些标准。将此更改为
id=NULL
允许命令按预期完成并使用
identical( spell.seq, seqs)
检查相等性 yield
true
.
关于r - 从 SPELL 数据创建序列对象,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16110508/
当我想在谷歌中搜索一个词或一些东西时;如果该单词或句子中有拼写错误,谷歌可以用正确的拼写或更正的句子回复我。谁能解释一下这是如何完成的。如果有人能用编程而不是数据库和所有这些东西来解释,我会很高兴。谢
我注意到如果我在 Google 搜索栏中打错了字,很可能会为我改正。 比如,如果我输入“不可思议”,它会提示“不可思议”,或者对于“stackovflow”,它会是“stackoverflow”。 这
可用于对整个源代码库及其相关资源文件进行拼写检查的工具或技术是什么? 拼写检查应该是源代码感知的,这意味着它会坚持检查代码中的字符串文字,而不是代码本身。如果拼写检查器理解常见的资源文件格式,例如包含
我知道拼写检查器并不完美,但随着文本数量的增加,它们变得越来越有用。如何拼写检查一个有数千页的网站? 编辑:由于复杂的服务器端处理,我可以通过 HTTP 获取页面的唯一方法。也不能外包给第三方。 编辑
我编写了一个快速概念验证控制台应用程序来测试 AzureSpell 认知服务产品的功能,但它似乎并不经常检测到明显的拼写错误。 通过其他 SO 答案尝试推荐,我的成功有限。 即使使用位于 https:
我如何在搜索引擎中创建像 Google 的“您的意思是……”这样的单词建议系统? 最好使用向量空间模型方法。我用谷歌搜索但没有找到解决方案。 最佳答案 看看the example来自 Peter No
我相信你们中有不少人看过 Google Wave 演示。我特别想知道拼写检查技术。拼写检查器通过找出单词在句子中上下文中出现的位置来提出这些建议,这是多么具有革命性? 我以前没见过这种技术,但其他地方
这是在一次采访中被问到的。 我认为答案可以通过构建所有有效单词的 trie 来完成,然后可以根据可能的有效路径提出建议,否则会被认为是不正确的。 假设用户输入 apfle,系统会在 ap 之后检测到一
我想写一个非常简单的拼写检查器。拼写检查器将尝试将输入的单词与字典中的等效单词进行匹配。 怎样才能找到那些“等价词”?可以对两个词进行什么分析来标记它们是等价的? 最佳答案 在投入太多尝试解开之前,我
我正在尝试使用 Stanford NLP 检查文本示例的拼写准确性。它只是文本的度量,而不是过滤器或其他任何东西,所以如果它稍微偏离一点也没关系,只要错误是统一的。 我的第一个想法是检查词典是否知道该
我正在尝试使用 seqdef 创建一个序列对象使用 SPELL 格式。这是我的数据示例: spell ] time axis: 1 -> 125 [>] SPELL data converted i
ASpell 有什么好的替代品吗?它是不错的开源软件,但已经有一段时间没有更新了。性能不太好,我无法使用非字母字符创建自定义工作列表。 最佳答案 Hunspell .这就是 Firefox 用于其拼写
vim 拼写检查器中是否有任何选项可以忽略纯文本文件中包含下划线、多个大写字母、减号、数字的单词。我在手册 (7.2) 或 Google 搜索中找不到任何内容。 最佳答案 您可以使用 syntax命令
如果我在Elasticsearch中有一个文档,其中一个字段包含术语“十”,那么是否有分析器/ token 生成器在搜索“10”或“十”时允许匹配该文档? 最佳答案 我不相信,不。我相信this qu
我已经安装了 eclipse ,并安装了 pydev 软件当我想改变字符时,我发现拼写服务没有安装。 不知道要启用这个服务,好像是默认设置 如何启用此服务 eclipse 版本:Neon Releas
我正在尝试使用 Hunspell纠正我写的一篇文章。不幸的是,它对我没用,只要它不打印拼错单词的行号。 所以现在我正在使用 -a选项,以便能够将其通过管道传输到 hunspell命令。手册页说,-L选
我试过用 Hunspell 浏览 SourceForge 上的文档,但我仍然迷路了。是否有 C++ 初学者能够遵循的 hunspell 的体面示例?否则,是否有任何更易于使用的免费/开源拼写检查器?
关闭。这个问题是off-topic .它目前不接受答案。 想改善这个问题吗? Update the question所以它是 on-topic对于堆栈溢出。 9年前关闭。 Improve this q
感谢 this answer on Code Review,我最近发现了拼写选项,而且我觉得该选项既非常有用(在编辑时)又非常烦人(在阅读代码时,因为所有误报)。 我想在切换到插入模式时以某种方式自动
我想自己编写 Metaphone 3 算法。有说明吗?我知道源代码可以出售,但这不是我要找的。 最佳答案 @Bo 的链接现在是指(现在是 deucnt)项目的整个源代码。 因此这里是新的链接,直接链接
我是一名优秀的程序员,十分优秀!