Language Policy is a tool for corporations to make official letters (with a bureaucratic language) come off more understandable for the average person. This tool is supported in both Word and Outlook.
The tool is activated via a button that opens a task pane. Language Policy scans the document for words that needs to be replaced with a more understandable synonym. The task pane shows a list of the found words that needs attention. We can configure either replacements or suggestions (or both). If both is configured, the task pane will show two tabs called "Replacements" and "Suggestions".
Replacements
When you click a highlighted word, the instance will be marked in the document and there is a drop down from which you can select between one or more replacements for the highlighted word, or you can write an alternative custom replacement directly in the drop down.
When the words has been replaced, or the document has been changed, you can click update in the task pane and the function will scan the document again for words that needs replacements.
Suggestions
Instead of having suggestions for word change, like we have with the replacements, this includes a description and guideline for what should be written. In this way, these suggestions are for change, but in text form. For instance, if the document contains ", som", the suggestion would be "Have you considered ending your sentence instead?".
When the feature find a word matching to what is configured in the JSON, it will show the keyword and the suggestion for a solution. For solving the issue, the user should move into the document where the issue is, and thus correct it manually. Thereafter, the user can click solve (the button with the tick mark), and when it is solved, it will turn green.
Enforcements
Enforcements will replace words in the document with corresponding words from the configuration in the JSON-file. This is used the enforce a more strict language policy, affording the user less freedom to control their language, but at the same time
If command is run in a SaveEvent, the word replacements will happen almost seamlessly. The command can also be added to a kind of "finalize"-button.
CMD
The following command is used to open the task pane.
<Cmd case="SkabelonDesign.LanguagePolicy:ShowTaskpane"/>
The following command is used to enforce word replacements from enforcement.json
:
<Cmd case="SkabelonDesign.LanguagePolicy:Enforce"/>
JSON
Language Policy finds words by finding matches on keywords from a JSON file that must be located in a folder called SkabelonDesign.LanguagePolicy
within the Content folder in the SDUP. Thus, the JSON file must contain all words that should be looked for.
Replacements
It is possible to have multiple keywords with multiple replacements belonging to it.
The JSON file must be called replacements.json
.
The "Keyword" is the word that should be replaced, while the "Replacements" contains a list (defined by [] of words that could replace the keyword.
Configuration of JSON file with one keyword with multiple replacements
{
"Keyword": "SomeKeyword",
"Replacements":
["Replacement1",
"Replacement2",
"Replacement3"]
}
Configuration of JSON file with multiple keyword with different amounts of replacements
[{
"Keyword": " SomeKeyword1",
"Replacements":
["Replacement1",
"Replacement2",
"Replacement3"]
},
{ "Keyword": " SomeKeyword2",
"Replacements":
["Replacement1",
"Replacement2"]
},
{
"Keyword": " SomeKeyword3",
"Replacements":["Replacement1"]
}]
Suggestions
It is possible to have multiple keywords, but there can only be one suggestion for each keyword as opposed to the replacements.
The JSON file must be called suggestions.json
.
Like in the replacements, the "Keyword" is the word that should be looked for, while the "Suggestion" is a description that suggest a solution to the problem.
Example of configuration
[{ "Keyword": ", som", "Suggestion": "Write a sentence here suggesting a solution to the problem." }, { "Keyword": ". Og", "Suggestion": "Write a sentence here suggesting a solution to the problem." }, { "Keyword": "kunde", "Suggestion": "Write a sentence here suggesting a solution to the problem." }]
Enforcement
It is possible to have multiple keywords, but there can only be one enforcement for each keyword as opposed to the replacements.
The JSON file must be called enforcements.json
.
Like in the replacements, the "Keyword" is the word that should be looked for, while the "Enforcement" is a description that suggest a solution to the problem.
Example of configuration
[{
"Keyword": "fx",
"Enforcement": "f.eks."
},
{
"Keyword": "tro",
"Enforcement": "vide"
}]
General semantics
There are a few rules that are important to know about the functionality of Language Policy:
- Language Policy is not case sensitive when it searches the document for keywords. This means that it is not checking the keywords for upper or lowercases. Thus, it does not make sense to configure the same keyword multiple times but with different casing in the JSON file.
- When Language Policy replaces a keyword, it sets the casing of the new word as in the keyword. If the keyword was all caps, the replacement will be all caps as well.
- When the user writes its own replacement in the drop down, it will replace the keyword with the exact word written in the drop down. This means that it is case sensitive in this case.
- Language Policy only searches for whole words. This means that if you have configured the keyword "anger", it will not be found in the word "danger".
Path to module and plugin
Module: ...\ModuleLibrary\LanguagePolicy
Plugin: ...\RawPlugins\SkabelonDesign.LanguagePolicy
Comments
0 comments
Article is closed for comments.