我不小心添加了一句话,我永远错误拼写到Eclipse的拼写检查词典中.我如何再次退回?
我正在制作一个简单的JS游戏,需要一个英文字典单词列表.我是否需要自己构建列表,或者是否可以访问系统或浏览器的拼写检查字典 - 或者可能还有其他解决方案?
我有一个大文本文件,包含许多错误/拼写错误的英文单词.我正在寻找一种在Linux中使用命令行拼写检查器编辑此文件的方法.我找到了一些方法来做到这一点,但根据我的搜索,他们都以互动的方式工作.我的意思是,看到一个错误/拼写错误的单词,他们建议对用户进行一些更正,他/她应该选择其中一个.由于我的文件相当大,并且包含许多错误的单词,我无法以这种方式编辑它.我正在寻找一种方法来告诉拼写检查器使用第一个候选人替换所有错误的单词.有没有办法做到这一点?(a/hun)法术有没有选择这样做?
问候.
Firefox已经开始相信我的默认拼写检查语言应该是西班牙语.我的全球偏好选择了英语:
偏好 - >内容 - >语言 - >英语[en]
在逐页的基础上,我可以通过以下方式重置拼写检查语言:
右键单击 - >语言 - >英语(美国)
但是,对于新打开的页面或新会话,默认拼写检查语言将返回西班牙语.我在这里找到了一个解决方法:https: //support.mozilla.org/en-US/questions/975459#answer-494574
这表明安装新词典会改变默认值.但是,这个问题长期以来一直困扰着我,我想知道是否有更"正确"的方法来更改默认的拼写检查语言.
我尝试外化我编写的任何应用程序中使用的所有字符串(和其他常量),原因很多,这可能是大多数堆栈溢出程序的第二天性,但我想要的是能够自动执行任何拼写检查.用户可见的字符串.这会带来几个问题:
你如何将这样的东西融入你的构建过程/测试套件中?每次更改应用程序时,有人手动拼写检查应用程序中的所有字符串是不可行的 - 并且第一次拼写错误的可能性不大.
这个小的Excel VBA函数总是返回false,没有传入任何单词.
Function SpellCheck(SomeWord As String)
SpellCheck = Application.CheckSpelling(SomeWord)
End Function
Run Code Online (Sandbox Code Playgroud)
实际上,在IDE中,我可以验证Application.CheckSpelling("hello")是否失败,尽管Excel拼写检查程序确实检测到了拼写错误.
我要做的是,如果拼写正确,每个单词都会得到一个T/F值.
我有很多人名(例如"john smith").我想通过名字查找人物.但是,有些查询会拼写错误(例如"jon smth","johnsm ith").是否有任何包含Python绑定的拼写修正库可能会为我找到经过拼写纠正的匹配?
我知道Whoosh和Python-aspell.Whoosh的拼写纠正对我来说并不适用,因为它将正确拼写的集合写入磁盘而不是将其存储在内存中.这使得我的应用程序查找速度太慢.由于代码的结构如何,改变这种行为似乎并不容易.另外,飞快移动不会对不同的角色编辑加权不同,即使"y"更可能与"i"("jim kazinsky" - >"jim kazinski")混淆,而不是'z' .
Aspell与人名不兼容,因为名字通常包含空格--Aspell认为这个词是纠正的基本单位.另外,据我所知,Aspell使用n-gram拼写校正模型,而不是字符编辑距离模型.虽然n-gram模型对于字典词是有意义的,但它对名称不起作用:人们"bob ruzatoxg"和"joe ruzatoxg"有很多共同的罕见三元组,因为它们具有相同的罕见姓氏.但他们显然是不同的人.
我还要提一下,我不能只将每个查询与集合中的所有条目进行比较 - 这太慢了.某些索引需要预先构建.
谢谢!
有没有办法在Sublime Text 2中快速切换拼写检查词典?每次用其他语言编写时,我都不想编辑配置文件.
我正在使用 Lucene 进行拼写检查操作。但它不索引 2 个字母的单词。这似乎是 Lucene 拼写检查的常见问题。
这是我的索引方法:
String fileName = "words.txt";
Dictionary dictionary = null;
try {
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(new FileInputStream(new File(fileName)), "UTF-8"));
dictionary = new PlainTextDictionary(bufferedReader);
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
} catch (FileNotFoundException e) {
e.printStackTrace();
}
SpellChecker spell = null;
try {
Directory directory = FSDirectory.open(spellCheckerPath);
spell = new SpellChecker(directory);
spell .setAccuracy(0.5f);
} catch (IOException e) {
e.printStackTrace();
}
IndexWriterConfig indexWriterConfig = new IndexWriterConfig(Version.LUCENE_4_10_2, new StandardAnalyzer());
indexWriterConfig.setOpenMode(OpenMode.CREATE_OR_APPEND);
try {
spell.indexDictionary(dictionary, indexWriterConfig, true); …Run Code Online (Sandbox Code Playgroud) 我试图在某些Windows 8.1机器上启用拼写检查时遇到异常(两者都有最新更新,操作系统语言是俄语,.NET框架4.7是俄语)说:
System.Reflection.TargetInvocationException:调用目标抛出了异常.---> System.Runtime.InteropServices.COMException:Windows.Data.Text.WordsSegmenter..ctor处的System.StubHelpers.StubHelpers.GetWinRTFactoryObject(IntPtr pCPCMD)中的注册表值(来自HRESULT的异常:0x80040153(REGDB_E_INVALIDVALUE))无效()字符串语言)---内部异常堆栈跟踪的结束---在System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr,Binder binder)的System.RuntimeMethodHandle.InvokeMethod(Object target,Object []参数,Signature sig,Boolean构造函数)中,对象[]参数,CultureInfo文化)在MS.Internal.WindowsRuntime.Windows.Data.Text.WordsSegmenter..ctor(String language)的MS.Internal.WindowsRuntime.ReflectionHelper.ReflectionNew [TArg1](类型类型,TArg1 arg1)在Syst的System.Windows.Documents.WinRTSpellerInterop.EnsureWordBreakerAndSpellCheckerForCulture(CultureInfo culture,Boolean throwOnError)的MS.Internal.WindowsRuntime.Windows.Data.Text.WordsSegmenter.Create(String language,Boolean shouldPreferNeutralSegmenter)系统.Windows.Documents.WinRTSpellerInterop..ctor()在System.Windows.Documents.SpellerInteropBase.CreateInstance()处于System.Windows.Documents.Speller.EnsureInitialized()处于System.Windows.Documents.Speller.SetCustomDictionaries(CustomDictionarySources dictionaryLocations, System.Windows上的System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)上的System.Windows.Controls.SpellCheck.OnIsEnabledChanged(DependencyObject d,DependencyPropertyChangedEventArgs e)中的System.Windows.Documents.TextEditor.SetCustomDictionaries(Boolean add)处的布尔添加)在System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs参数)在System.Windows.DependencyObject.UpdateEffectiveValue(entryIndex entryIndex,的DependencyProperty DP,PropertyMetadata元数据,EffectiveValueEntry oldEntry,EffectiveValueEntry&newEntry,布尔coerceWithDeferredReference,布尔coerceWithCu .FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs E)System.Windows.DependencyObject.SetValue(DependencyProperty dp,Object value)中的System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp,Object value,PropertyMetadata metadata,Boolean coerceWithDeferredReference,Boolean coerceWithCurrentValue,OperationType operationType,Boolean isInternal)中的rrentValue,OperationType operationType)
此代码可用于重现该问题:
var richTextBox = new RichTextBox();
InputLanguageManager.SetInputLanguage(richTextBox,CultureInfo.GetCultureInfo("en-US"));
richTextBox.SetValue(SpellCheck.IsEnabledProperty, true);
Run Code Online (Sandbox Code Playgroud)
在研究这个问题时,我发现异常是从s_WinRTType描述类型"Windows.Data.Text.WordsSegmenter,Windows,ContentType = WindowsRuntime.WindowsSegmenter似乎是WinRT组件的s_WinRTType.ReflectionNew<string>(language);地方抛出的,所以我看不到里面发生了什么.我想要要知道它为什么抛出REGDB_E_INVALIDVALUE /它寻找的值以及它应该是什么样的?谢谢!
spell-checking ×10
java ×2
aspell ×1
build ×1
c# ×1
command-line ×1
default ×1
dictionary ×1
eclipse ×1
excel ×1
firefox ×1
hunspell ×1
javascript ×1
linux ×1
lucene ×1
nlp ×1
nltk ×1
python ×1
richtextbox ×1
sublimetext2 ×1
vba ×1
whoosh ×1
wpf ×1