Intelligent_Spelling_Correction:超越传统拼写校正的一步。 采用NLP技术进行工程设计,可从上下文

  • B0_168595
    了解作者
  • 4.3MB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-05-07 04:16
    上传日期
简介:纠正诸如“ campagn”(活动)之类的拼写错误相对容易。 但是,如果您打算键入“三”,则常见的错误是键入“有”而不是“三”。 “有”和“三个”的拼写正确。 但是,如果我们比较短语“三天”和“有天”,则显然“三天”是正确的短语。 如何使您的拼写校正算法识别上述差异? 在此程序中,我尝试使用上下文中的信息来解决此问题。 所需的Python软件包:re,collections,nltk,numpy,operator,csv,sys兼容性:该程序经过测试,可以使用Anaconda发行版在Python 3.6.5上运行 该程序需要几分钟才能运行给定的示例。 因此,请耐心等待。 如何运行:python3 main.py inputFileLocation For example, python3 main.py /Users/tg/Desktop/517/assignment2/i
Intelligent_Spelling_Correction-master.zip
  • Intelligent_Spelling_Correction-master
  • CSV_files
  • insert.csv
    1.5KB
  • substitute.csv
    1.4KB
  • del.csv
    1.5KB
  • reversal.csv
    1.4KB
  • resources
  • count_2w.txt
    5.3MB
  • names.txt
    54.6KB
  • big.txt
    6.2MB
  • input.txt
    341B
  • Description.docx
    17.5KB
  • readme.txt
    1KB
  • output.txt
    387B
  • main.py
    8.3KB
  • ReadMe.md
    1KB
  • .DS_Store
    6KB
内容介绍
Summary: Correcting spelling mistakes like "campagn" (campaign) is comparatively easy. However, if you intend to type 'three', a common mistake is typing 'there' instead of 'three'. Both 'there' and 'three' are spelled correctly. However, if we compare the phrases 'three days' and 'there days', it it obvious 'three days' is the correct phrase. How to make your spelling correction algorithm recognize the difference mentioned above? In this program, I attempt to solve this problem using information from the context. Required Python packages: re, collections, nltk, numpy, operator, csv, sys Compatibility: The program is tested to run on Python 3.6.5 using Anaconda distribution The program takes a few minutes to run with the given example. So some patience is appreciated. How to run: python3 main.py inputFileLocation For example, python3 main.py /Users/tg/Desktop/517/assignment2/input.txt Outputs: The program will generate "output.txt" file in the same location where the file main.py is located.
评论
    相关推荐