Can we edit the dictionary which are pre exist
Questions about XML that are not covered by the other forums should go here.
-
- Posts: 99
- Joined: Fri Jul 01, 2022 12:08 pm
Can we edit the dictionary which are pre exist
Post by shikhar_472 »
Can we edit the dictionary which is pre exist in dict folder as it is getting auto loaded while re starting the server attaching the image for reference.
Also is it possible to use other dictionary which has some other extension like (.ENG)
Also is it possible to use other dictionary which has some other extension like (.ENG)
- image.png (26.08 KiB) Viewed 2322 times
- Attachments
-
- dict.PNG (20.81 KiB) Viewed 2322 times
-
- image.png (26.08 KiB) Viewed 2322 times
-
- Posts: 99
- Joined: Fri Jul 01, 2022 12:08 pm
Re: Can we edit the dictionary which are pre exist
Post by shikhar_472 »
Hi Team,
Is there any update on this.
Also as per our requirement we are replacing one the the pre existing editor with oxygen web author so there we are using the dictionary by microsoft which contains .lex file is there any way we can use those dictionary file as part of custom spell check functionality.
Or we can convert .lex file to .dic file
Thanks,
Shikhar.
Is there any update on this.
Also as per our requirement we are replacing one the the pre existing editor with oxygen web author so there we are using the dictionary by microsoft which contains .lex file is there any way we can use those dictionary file as part of custom spell check functionality.
Or we can convert .lex file to .dic file
Thanks,
Shikhar.
-
- Posts: 495
- Joined: Thu Sep 04, 2014 4:22 pm
Re: Can we edit the dictionary which are pre exist
Post by cristi_talau »
Hello,
Sorry for the late reply.
You are right - if you delete one of the ".dic" files it will be copied over again when the server restarts. You can workaround this issue by deleting the ".dic" files from the source JAR (located in "tomcat\webapps\oxygen-xml-web-author\WEB-INF\lib\dicts-hunspell.jar".
However, most of our clients that want to customize spellchecking use custom terms lists or custom dictionaries .
For more advanced use-cases, we have a spell-checker API that you can implement in an editor plugin.
Regarding the LEX format, it is not supported and we are not aware of any tool that converts this format to the "dic" format (supported by Hunspell). If you find such a tool, it would be great to update this forum thread to let other users know.
Best,
Cristian
Sorry for the late reply.
You are right - if you delete one of the ".dic" files it will be copied over again when the server restarts. You can workaround this issue by deleting the ".dic" files from the source JAR (located in "tomcat\webapps\oxygen-xml-web-author\WEB-INF\lib\dicts-hunspell.jar".
However, most of our clients that want to customize spellchecking use custom terms lists or custom dictionaries .
For more advanced use-cases, we have a spell-checker API that you can implement in an editor plugin.
Regarding the LEX format, it is not supported and we are not aware of any tool that converts this format to the "dic" format (supported by Hunspell). If you find such a tool, it would be great to update this forum thread to let other users know.
Best,
Cristian
-
- Posts: 99
- Joined: Fri Jul 01, 2022 12:08 pm
Re: Can we edit the dictionary which are pre exist
Post by shikhar_472 »
Thanks Critian,
I want to set the terms dictionary document specific but using this API same dictionary is getting used for other document as well,
Could you please suggest the way to do that.
Thanks,
Shikhar.
I want to set the terms dictionary document specific but using this API same dictionary is getting used for other document as well,
Could you please suggest the way to do that.
Thanks,
Shikhar.
-
- Posts: 495
- Joined: Thu Sep 04, 2014 4:22 pm
Re: Can we edit the dictionary which are pre exist
Post by cristi_talau »
Hello,
Your code should look like this:
In this case, the dictionary is set only for the current document. Do you experience a different behavior?
Best,
Cristian
Your code should look like this:
Code: Select all
authorDocumentModel.getSpellchecker().setTermsDictionary(...)
Best,
Cristian
-
- Posts: 99
- Joined: Fri Jul 01, 2022 12:08 pm
Re: Can we edit the dictionary which are pre exist
Post by shikhar_472 »
Hi Cristi,
I have opened a document using one URL and set the word to the custom dictionary "Eitenmiller" so this word is not throwing error here -
http://localhost:8084/oxygen-xml-web-au ... /Document1
Now i have opened the second document using the same URL on different tab "Eitenmiller" here also error is gone for this word-
http://localhost:8084/oxygen-xml-web-au ... /Document2
Requirement-- for the second URL error should not gone for the word "Eitenmiller" terms dictionary which has been set for document1 should not reflect in document2.
Thanks,
Shikhar.
I have opened a document using one URL and set the word to the custom dictionary "Eitenmiller" so this word is not throwing error here -
http://localhost:8084/oxygen-xml-web-au ... /Document1
Now i have opened the second document using the same URL on different tab "Eitenmiller" here also error is gone for this word-
http://localhost:8084/oxygen-xml-web-au ... /Document2
Requirement-- for the second URL error should not gone for the word "Eitenmiller" terms dictionary which has been set for document1 should not reflect in document2.
Thanks,
Shikhar.
-
- Posts: 495
- Joined: Thu Sep 04, 2014 4:22 pm
Re: Can we edit the dictionary which are pre exist
Post by cristi_talau »
Hello,
I do not fully understand the context of your problem:
Best,
Cristian
I do not fully understand the context of your problem:
- Do you use a terms dictionary as described here: https://www.oxygenxml.com/doc/versions/ ... -list.html ?
- Do you use the Learn Words plugin: https://github.com/oxygenxml/web-author ... ds-plugin/?
- Did you implement your own plugin?
Best,
Cristian
-
- Posts: 99
- Joined: Fri Jul 01, 2022 12:08 pm
Re: Can we edit the dictionary which are pre exist
Post by shikhar_472 »
Yes,
we are using our own custom plugin using similar implementation to learn word plugin,
spellchecker.setTermsDictionary(apiDict);
We are setting apiDict on load of the document at EDITOR_LOADED event.
Our use case is to load different custom dictionary(apiDict) for each document.
Also i want to achieve this in web author as we are using webdav URL to load the document
Thanks,
Shikhar.
we are using our own custom plugin using similar implementation to learn word plugin,
spellchecker.setTermsDictionary(apiDict);
We are setting apiDict on load of the document at EDITOR_LOADED event.
Our use case is to load different custom dictionary(apiDict) for each document.
Also i want to achieve this in web author as we are using webdav URL to load the document
Thanks,
Shikhar.
-
- Posts: 495
- Joined: Thu Sep 04, 2014 4:22 pm
Re: Can we edit the dictionary which are pre exist
Post by cristi_talau »
Hello,
So, you say that the API is behaving unexpectedly? If yes, can you share with us a simple plugin that manifests the problematic behavior?
Best,
Cristian
So, you say that the API is behaving unexpectedly? If yes, can you share with us a simple plugin that manifests the problematic behavior?
Best,
Cristian
-
- Posts: 99
- Joined: Fri Jul 01, 2022 12:08 pm
Re: Can we edit the dictionary which are pre exist
Post by shikhar_472 »
- content-plugin.zip
- (19.8 KiB) Downloaded 300 times
Please find the attached plugin i am using.
Thanks,
Shikhar.
Re: Can we edit the dictionary which are pre exist
Hi,
We tested your plugin and the problem that you encountered is produced by the fact that you use class fields in AddToDictionary operation. The value of "readAllWords" is reused between editors because there is a single instance of AddToDictionary operation that is used for all editors, not one per editor.
Please let us know if you encounter any other problems.
Best Regards,
Mihaela.
We tested your plugin and the problem that you encountered is produced by the fact that you use class fields in AddToDictionary operation. The value of "readAllWords" is reused between editors because there is a single instance of AddToDictionary operation that is used for all editors, not one per editor.
Please let us know if you encounter any other problems.
Best Regards,
Mihaela.
Mihaela Calotescu
http://www.oxygenxml.com
http://www.oxygenxml.com
-
- Posts: 99
- Joined: Fri Jul 01, 2022 12:08 pm
Re: Can we edit the dictionary which are pre exist
Post by shikhar_472 »
Hi Miheala,
How can we seprate the dictionary for each editor.
Is there any way to do that.
Also is there any method where we can get the document ID so we can update the dictionary on the basis of doc Id in map.
Thanks,
Shikhar.
How can we seprate the dictionary for each editor.
Is there any way to do that.
Also is there any method where we can get the document ID so we can update the dictionary on the basis of doc Id in map.
Thanks,
Shikhar.
Last edited by shikhar_472 on Thu Nov 10, 2022 8:30 am, edited 1 time in total.
-
- Posts: 99
- Joined: Fri Jul 01, 2022 12:08 pm
Re: Can we edit the dictionary which are pre exist
Post by shikhar_472 »
Could you please update on this.
Re: Can we edit the dictionary which are pre exist
Hello,
If you want to save the dictionary for each editor, to update it during the editing, you can use the EditingSessionContext API. To get the editing session context you can use the ro.sync.ecss.extensions.api.access.AuthorEditorAccess.getEditingContext() method.
Please let us know if you need other information.
Best Regards,
Mihaela
If you want to save the dictionary for each editor, to update it during the editing, you can use the EditingSessionContext API. To get the editing session context you can use the ro.sync.ecss.extensions.api.access.AuthorEditorAccess.getEditingContext() method.
Please let us know if you need other information.
Best Regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com
http://www.oxygenxml.com
Return to “General XML Questions”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service