Jump to content

Please read the Forum Rules before posting.

Photo
- - - - -

Macro request...


6 replies to this topic

#1 BaptizedBeliever

BaptizedBeliever

    Christian

  • Members (T)
  • PipPipPipPipPip
  • 924 posts
Offline

Posted 19 July 2013 - 10:47 AM

In some older writings (especially pre-1800), the hard "s" sound was represented by an "f" in the text.  I have many of these on my computer, and am wanting to find a way to fix the spelling (convert those "f"s with an "s") without having to do it manually.  On a short document, it might not be that bad, but I've got 300+ page books that are waiting for conversion.

 

Is there a macro that can do this?  Or am I just pretty much stuck?

 

-Brad



#2 Josh Bond

Josh Bond

    Administrator

  • Administrators
  • PipPipPipPipPip
  • 2,889 posts
  • LocationGallatin, TN
Offline

Posted 19 July 2013 - 10:53 AM

Is the "f" a real "f" or an f without the crossbar?



#3 BaptizedBeliever

BaptizedBeliever

    Christian

  • Members (T)
  • PipPipPipPipPip
  • 924 posts
Offline

Posted 19 July 2013 - 11:07 AM

AbbyFineReader thinks it's a real "f".  Some of them look like the have the crossbar, but it's such an old stained original that I'm looking at that some of them are hard to tell.



#4 Josh Bond

Josh Bond

    Administrator

  • Administrators
  • PipPipPipPipPip
  • 2,889 posts
  • LocationGallatin, TN
Offline

Posted 19 July 2013 - 11:11 AM

The trick would be if you could train Abby, with the character editing, to recognize it as a different character. Then you could search/replace.

 

It would be hard to write a macro because it wouldn't have a way to distinguish between real f's and the ones that need to be "s".



#5 TaSwavo

TaSwavo

    e-Sword Supporter

  • Veterans
  • PipPipPip
  • 30 posts
  • LocationYorkshire, UK
Offline

Posted 19 July 2013 - 05:21 PM

would you be interested in a post-process that coverts based upon the english dictionary and some common rules?

I've been thinking of writing something to do this for a while - to include in my C# modules builder project. I am a programmer for my job (usually in c++) and love to work with the extra speed c# gives me in achieving my aims.

 

For example if you text reads "and so the faints shall be granted access to heaven" then it should know faints is a verb and so 'the faints' is probably wrong.

 

tbh - I think this would need to be user decisicion

 

it would pop up the text and as you to decide - but it could find the obvious ones and fix then (with a log) and prompt you for the others.

 

It's not a small task (I expect) but one I have thought about before.

 

If you'd like to pm me a sample (of your errant processed file) or even a jpg (or whatever) can use ABBY Finereader 9.0 on - I'd LOVE to work on this - no guarantees, when I reach a limit I usually know...

 

as Josh says - it's VERY difficult to say when an F is an S but if we can do it when reading --- it's probably possible most of the time. And the other times we can pop up. I'll look into it.



#6 BH.

BH.

    Utility Developer

  • Contributors
  • PipPipPipPipPip
  • 1,244 posts
  • LocationCalifornia
Offline

Posted 19 July 2013 - 09:45 PM

 Another way is to take out all the words, and make a list of those with f's in them.  Perhaps with 2 duplicate columns.  One would just read the list, remove those that are ligit, and edit the second column with the corrected spelling.  Then use that list to do a find and replace, in code of course, Done!   :rolleyes:

 

I have attached a T4 Macro to capture all the words with an lowercase "f" in them and put them into a file in your "...\Documents\e-Sword Tooltip Tool NT" folder named "F-List.txt".  I have not written a macro to then take this list and do a find and replace.  IF you think it would work for your project, then I can do that.  It should not be too hard.  This is not as sophisticated as TaSwavo proposes, just a quick hack as it were...

 

Put the unzipped attached macro into your "...\documents\e-Sword Tooltip Tool NT" folder.  Click Tools+Macros+MacroFList.

 

 

 

Attached Files



#7 Tony Stark

Tony Stark

    Liking e-Sword

  • Members
  • PipPip
  • 23 posts
Offline

Posted 20 July 2013 - 05:44 AM

It would still be a bit of work, but if is a Word document that you are working with (you can convert it if it isn't) then go to the "Home" tab, then find the "Replace" button, and set it to replace "f's" with "s's" and then just skip the words that have "f's" when they are supposed to :D. Tell me if this works please :D.





Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users




Similar Topics



Latest Blogs