Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8200485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T06:27:51+00:00 2026-06-07T06:27:51+00:00

I have a TSV (tab-separated value) file that I need to spell-check for misspellings

  • 0

I have a TSV (tab-separated value) file that I need to spell-check for misspellings and combined words (ie ‘I love you’ vs ‘Iloveyou’).

I’ve installed Aspell on my machine and can run it through R using the aspell() function.

files <- "train2.tsv"
 res <- aspell(files)
 str(res)
 summary(res)

However, the output from running it in R is just a list of misspelled words and possible suggestions.

>  summary(res)
Possibly mis-spelled words:
 [1] "amant"        "contaneir"    "creat"        "ddition"      "EssaySet"     "EssayText"    "experiament"  "expireiment"  "expirement"  
[10] "Fipst"        "infomation"   "Inorder"      "measureing"   "mintued"      "neccisary"    "officialy"    "renuminering" "rinsen"      
[19] "sticlenx"     "sucessfully"  "tipe"         "vineager"     "vinigar"      "yar"   

>  str(res)
Classes ‘aspell’ and 'data.frame':      27 obs. of  5 variables:
 $ Original   : chr  "EssaySet" "EssayText" "expirement" "expireiment" ...
 $ File       : chr  "train2.tsv" "train2.tsv" "train2.tsv" "train2.tsv" ...
 $ Line       : int  1 1 3 3 3 3 3 3 6 6 ...
 $ Column     : int  4 27 27 108 132 222 226 280 120 156 ...
 $ Suggestions:List of 27
  ..$ : chr  "Essay Set" "Essay-Set" "Essayist" "Essays" ...
  ..$ : chr  "Essay Text" "Essay-Text" "Essayist" "Sedatest" ...
  ..$ : chr  "experiment" "excrement" "excitement" "experiments" ...
  ..$ : chr  "experiment" "experiments" "experimenter" "excrement" ...
  ..$ : chr  "Amandy" "am ant" "am-ant" "Amanda" ...
  ..$ : chr  "year" "ya" "Yard" "yard" ...

Is there are way to have aspell (or any other spellchecker) automatically correct misspelled words?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T06:27:54+00:00Added an answer on June 7, 2026 at 6:27 am

    It looks like you can do the following:

    s = load_up_users_dictionary()
    
    for word in text_to_check:
        if word not in s:
            new_words = s.suggest( word )
            replace_incorrect_word( word, new_words[0] )#Pick the first word from the returned list.
    

    Just a quick glance over the documentation and that looks like what you would have to do to automatically use the suggested correct spelling.

    http://0x80.pl/proj/aspell-python/index-c.html

    Edit:
    Realize that you may not be looking for python code, but this would be the easiest way to do it with python as the question was tagged with python. There is probably a more efficient method of doing it, but it’s getting late and this came to mind first.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Tab Separated Value file that I need to import in mongodb
I have been able to extract certain lines from a large tab-separated text file
I have a TSV file that consists of integers along with some false data
I have a Perl script using a system call to sort a tsv file:
I have several TSV files ranging in size from 2MB to 450MB. I need
Have a network location that shows paths in the 8.3 short format. I need
Say you have 32000 records with 89 bytes/record stored in a TSV file. You
I have over 125 TSV files of ~100Mb each that I want to merge.
Have you any idea how to find out if spell check suggestions dialog is
I have a multiline TSV file with the following format: Type\tBasic Name\tAttribute\tA Long Description\n

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.