Vale Vocabularies in Terminology Checker?
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 30
- Joined: Thu Nov 30, 2023 12:45 pm
Vale Vocabularies in Terminology Checker?
Post by horisonten »
Hello,
I'm having a hard time making it so that "word2" is not being falsely highlighted if it is in used in combination of an approved word.
word2 on its own should report an error and suggest the correct phrase. It should suggest to use "word1 word2" instead. word1 and word2 in combination is approved and should therefore not throw an error. Currently it is throwing an error because word2 is in the name.
So I need to somehow be able to add custom word combinations that are approved. It seems as if Vocabularies in Vale would solve the issue. But this is not supported currently, correct?
Is there a workaround/hack to make something similar happen using the <incorrect-terms> file or vale 'action' and 'swap'?
I'm having a hard time making it so that "word2" is not being falsely highlighted if it is in used in combination of an approved word.
word2 on its own should report an error and suggest the correct phrase. It should suggest to use "word1 word2" instead. word1 and word2 in combination is approved and should therefore not throw an error. Currently it is throwing an error because word2 is in the name.
So I need to somehow be able to add custom word combinations that are approved. It seems as if Vocabularies in Vale would solve the issue. But this is not supported currently, correct?
Is there a workaround/hack to make something similar happen using the <incorrect-terms> file or vale 'action' and 'swap'?
-
- Posts: 78
- Joined: Wed Jun 22, 2016 2:48 pm
Re: Vale Vocabularies in Terminology Checker?
Post by adrian_sorop »
Hi,
Unfortunately I don't fully undestand your use case.
Can you please post a real example? A sentence and the expected good/bad words combination that should be matched by Term Checker would be perfect.
Regards,
Adrian S.
Unfortunately I don't fully undestand your use case.
Can you please post a real example? A sentence and the expected good/bad words combination that should be matched by Term Checker would be perfect.
Regards,
Adrian S.
Adrian Sorop
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 30
- Joined: Thu Nov 30, 2023 12:45 pm
Re: Vale Vocabularies in Terminology Checker?
Post by horisonten »
Sorry, it was not clear at all when reading it again.adrian_sorop wrote: ↑Mon Jul 01, 2024 8:58 am Hi,
Unfortunately I don't fully undestand your use case.
Can you please post a real example? A sentence and the expected good/bad words combination that should be matched by Term Checker would be perfect.
Regards,
Adrian S.
If I write "joint" it should give me a suggestion. But I don't want to it to give me the suggestion if I write "pre-moulded joint" which also includes the word join but as part of an approved suggestion.
See the issue here:
https://drive.google.com/file/d/1Gg_IsT ... p=drivesdk
This doesn't work:
https://drive.google.com/file/d/1Geuqwd ... p=drivesdk
Last edited by horisonten on Mon Jul 01, 2024 1:53 pm, edited 1 time in total.
-
- Posts: 78
- Joined: Wed Jun 22, 2016 2:48 pm
Re: Vale Vocabularies in Terminology Checker?
Post by adrian_sorop »
Hi,
Here's an XML term defintion
This term, applyed to the following text, it will match only the first 2 paragraphs
I changed the type of the match to regular-expression and defined a negative lookbehind to ensure the word "joint" is not preceded by "pre-moulded" or "taped".
The last part is \bjoint\b to match the word "joint" with word boundaries to ensure that it is matched as a whole word and not as a part of another word.
It's up to you if you want to convert the term to Vale rule or use XML rules.
Regards,
Adrian S.
Here's an XML term defintion
Code: Select all
<incorrect-term ignorecase="true">
<match type="regular-expression">(?<!pre-moulded\s|taped\s)\bjoint\b</match>
<message>Do something</message>
<link>https://www.example.com</link>
</incorrect-term>
Code: Select all
<p>joint</p>
<p>some joint</p>
<p>pre-moulded joint</p>
<p>taped joint</p>
The last part is \bjoint\b to match the word "joint" with word boundaries to ensure that it is matched as a whole word and not as a part of another word.
It's up to you if you want to convert the term to Vale rule or use XML rules.
Regards,
Adrian S.
Adrian Sorop
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 30
- Joined: Thu Nov 30, 2023 12:45 pm
Re: Vale Vocabularies in Terminology Checker?
Post by horisonten »
Thank you so very muchadrian_sorop wrote: ↑Mon Jul 01, 2024 7:27 pm I changed the type of the match to regular-expression and defined a negative lookbehind to ensure the word "joint" is not preceded by "pre-moulded" or "taped".
The last part is \bjoint\b to match the word "joint" with word boundaries to ensure that it is matched as a whole word and not as a part of another word.
It's up to you if you want to convert the term to Vale rule or use XML rules.
Regards,
Adrian S.

I also got it to work as expected in my .yml file with this;
'(?<!pre-moulded\s|straight\s|taped\s|transition\s)\bjoint\b': pre-moulded joint|straight joint|taped joint|transition joint
Return to “DITA (Editing and Publishing DITA Content)”
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