Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Add a personal word list to program
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post will appear after it is approved by moderators
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Shahin Azad  
View profile  
 More options Oct 10 2012, 9:37 am
From: Shahin Azad <ishahin...@gmail.com>
Date: Wed, 10 Oct 2012 06:37:14 -0700 (PDT)
Local: Wed, Oct 10 2012 9:37 am
Subject: Add a personal word list to program

I tried to add a personal word list as a dictionary to my program like this:

    pwl = enchant.request_pwl_dict("mywords.txt")
but after running my program mywords.txt file become to an empty file and my editor didn't do any correction at all. I try it with English language
(That I have it's dictionary in my enchant installation) and it works fine.
I want to have an spell correction on my text editor without install a dictionary in enchant installation. Then I made my own dictionary and I want to use
it as a regular dictionary, but it's not working :-(


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ryan Kelly  
View profile  
 More options Oct 10 2012, 4:45 pm
From: Ryan Kelly <r...@rfk.id.au>
Date: Thu, 11 Oct 2012 07:45:21 +1100
Local: Wed, Oct 10 2012 4:45 pm
Subject: Re: Add a personal word list to program
On 11/10/12 00:37, Shahin Azad wrote:

> I tried to add a personal word list as a dictionary to my program like this:

>      pwl  =  enchant.request_pwl_dict("mywords.txt")

I'm not sure I understand.  What does your program do with pwl once it
has been created?  If you can send through the entire program or a
representative example then I may be of more help.

> but after running my program mywords.txt file become to an empty file

Are you saying that it was created as an empty file?  This is the
expected behaviour.

Or are you saying hat its existing contents were overwritten?  This
would be a pretty serious bug in pyenchant.

> and my editor didn't do any correction at all.
> I try it with English language
> (That I have it's dictionary in my enchant installation) and it works fine.
> I want to have an spell correction on my text editor without install a dictionary in enchant installation. Then I made my own dictionary and I want to use
> it as a regular dictionary, but it's not working :-(

What editor are you using?  I will need more details to be of any help here.

  Cheers,

    Ryan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Shahin Azad  
View profile  
 More options Oct 11 2012, 10:03 am
From: Shahin Azad <ishahin...@gmail.com>
Date: Thu, 11 Oct 2012 07:03:34 -0700 (PDT)
Local: Thurs, Oct 11 2012 10:03 am
Subject: Re: Add a personal word list to program

Hi, Thank you for your answer.

> I'm not sure I understand.  What does your program do with pwl once it
> has been created?  If you can send through the entire program or a
> representative example then I may be of more help.

I attached the python source "spell.py".
I used an example from the internet as editor.

> Or are you saying hat its existing contents were overwritten?  This
> would be a pretty serious bug in pyenchant.

Yes. I exactly mean it.

  spell.py
3K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ryan Kelly  
View profile  
 More options Oct 11 2012, 5:58 pm
From: Ryan Kelly <r...@rfk.id.au>
Date: Fri, 12 Oct 2012 08:56:58 +1100
Local: Thurs, Oct 11 2012 5:56 pm
Subject: Re: Add a personal word list to program
On 12/10/12 01:03, Shahin Azad wrote:

> Hi, Thank you for your answer.

>  > I'm not sure I understand.  What does your program do with pwl once it
>  > has been created?  If you can send through the entire program or a
>  > representative example then I may be of more help.

> I attached the python source "spell.py".
> I used an example from the internet as editor.

>  > Or are you saying hat its existing contents were overwritten?  This
>  > would be a pretty serious bug in pyenchant.

> Yes. I exactly mean it.

Yikes!  What version of pyenchant are you using, on what platform, and
how did you install it?  I recall a bug like this in earlier versions
but I think it was fixed.

Can you please try a small experiment to isolate this behaviour?

   * Create a text file named "test.pwl" containing just the
     word "hello".

   * Enter an interactive python shell and do nothing else but:

         import enchant
         d = enchant.request_pwl_dict("test.pwl")
         print d.check("hello")

   * If it printed "False", then print out the enchant version info
     and send it through with your reply to help me debug:

         print enchant.__version__
         print enchant.get_enchant_version()

   * Check whether the "test.pwl" file has been overwritten.

I will try out your example script on my machine and report back.

   Cheers,

     Ryan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Shahin Azad  
View profile  
 More options Oct 12 2012, 9:18 am
From: Shahin Azad <ishahin...@gmail.com>
Date: Fri, 12 Oct 2012 06:18:16 -0700 (PDT)
Local: Fri, Oct 12 2012 9:18 am
Subject: Re: Add a personal word list to program

My pyenchant version is 1.6.5. I'm using it on a Linux system with
preinstalled enchant 1.5.0.
I installed enchant with pip command.

And after all I did that test you said and it returns False and overwrote
my test.pwl file.

Thank you,

  Shahin


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Shahin Azad  
View profile  
 More options Oct 17 2012, 6:00 pm
From: Shahin Azad <ishahin...@gmail.com>
Date: Wed, 17 Oct 2012 15:00:20 -0700 (PDT)
Local: Wed, Oct 17 2012 6:00 pm
Subject: Re: Add a personal word list to program

Any hope?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ryan Kelly  
View profile  
 More options Oct 19 2012, 12:18 am
From: Ryan Kelly <r...@rfk.id.au>
Date: Fri, 19 Oct 2012 14:59:12 +1100
Local: Thurs, Oct 18 2012 11:59 pm
Subject: Re: Add a personal word list to program
On 13/10/12 00:18, Shahin Azad wrote:

> My pyenchant version is 1.6.5. I'm using it on a Linux system with
> preinstalled enchant 1.5.0.
> I installed enchant with pip command.

> And after all I did that test you said and it returns False and
> overwrote my test.pwl file.

This is a known bug in enchant 1.5.0:

   http://bugzilla.abisource.com/show_bug.cgi?id=12350

Updating to enchant 1.6.0 should fix the problem.

   Cheers,

     Ryan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »