Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: michielper on April 17, 2018, 10:42:13 pm

Title: Glossary plural terms
Post by: michielper on April 17, 2018, 10:42:13 pm
It seems like I have to add two entries for every term in the Glossary that occurs both in singular and plural in my texts. This is very inelegant of course. Is there a way around this?
Title: Re: Glossary plural terms
Post by: qwerty on April 17, 2018, 11:01:14 pm
No. It has been discussed here a couple of years ago. Pluralization is not that trivial (for Sparx) and they are not willing to create a Pareto solution.

q.
Title: Re: Glossary plural terms
Post by: Glassboy on April 18, 2018, 07:48:08 am
No. It has been discussed here a couple of years ago. Pluralization is not that trivial (for Sparx) and they are not willing to create a Pareto solution.

My dialect of English which has a large smattering of Polynesian loan words certainly has non-trivial pluralisation.  How would you propose this Pareto solution detected the source language of the word and applied the correct pluralisation scheme? 
Title: Re: Glossary plural terms
Post by: qwerty on April 18, 2018, 08:43:01 am
Go and read what the Pareto principle is, smarty. It has absolutely nothing to do with correctness.

q.
Title: Re: Glossary plural terms
Post by: Paolo F Cantoni on April 18, 2018, 09:38:04 am
Now, Now children,

Both of you go sit in the opposite corners and say sorry!   :D

You can only come out when you've agreed to behave!      ;)

I believe it was irony, .

Paolo
Title: Re: Glossary plural terms
Post by: Glassboy on April 18, 2018, 09:59:35 am
There is an important point underlying my question.  Here in the post-colonial world there is real offence taken over the abuse of indigenous languages.  The desire to just suck it and see from a former coloniser doesn't hold much appeal.

Now I know it was just another cheap shot against Sparx, but it's also a much bigger issue than just what is in the EA Glossary.  The authoritative source for the EA Glossary should be the organisations enterprise business glossary which should contain not only pluralisations but also synonyms.

Personally I'm glad Sparx is not committing any further evil by fooling around with something that needs to be done properly. 
Title: Re: Glossary plural terms
Post by: KP on May 07, 2018, 11:58:12 am
So the Pareto Principle suggests that if 80% of plurals are formed by adding 's' to a noun then finding a simple solution to 's' plurals could be an easy win.

First attempt: If a word ends in 's' and it's in the glossary, show that glossary item. If a word ends in 's' and it isn't in the glossary, look for an entry with the 's' removed and show that glossary item. This only fails when there is a glossary term 'xyz' for which 'xyzs' is a real word that isn't the plural of 'xyz', and isn't itself a glossary term. Probably not too many of those, but enough to be annoying?
Title: Re: Glossary plural terms
Post by: Uffe on May 07, 2018, 07:53:21 pm
Probably not too many of those, but enough to be annoying?
With this kind of function, you generally need a very low error rate (less than 1%) for it to be considered acceptable.

In a scenario where the glossary is used on a broad front and the models are well-described, there will easily be half a dozen glossary highlights in any given notes field. With an error rate of, say, 5%, this means you'll find an incorrect glossary highlight every four or five elements you look at. Granted, not every highlight will be a plural form, but if you throw in participles, tenses, and a few other fun things along those lines it very quickly breaks down completely.

My point is that guesswork is not going to be good enough for this. What is needed is the ability to use a proper dictionary (which provides forms of words, not just their respective meanings) in conjunction with the glossary. The users can then select the appropriate dictionary for their language and culture.


/Uffe
Title: Re: Glossary plural terms
Post by: Glassboy on May 08, 2018, 08:14:17 am
So the Pareto Principle suggests that if 80% of plurals are formed by adding 's' to a noun then finding a simple solution to 's' plurals could be an easy win.

First attempt: If a word ends in 's' and it's in the glossary, show that glossary item. If a word ends in 's' and it isn't in the glossary, look for an entry with the 's' removed and show that glossary item. This only fails when there is a glossary term 'xyz' for which 'xyzs' is a real word that isn't the plural of 'xyz', and isn't itself a glossary term. Probably not too many of those, but enough to be annoying?

That only works for the sub-set of English that is Germanic in origin, is"regular", or has been completely Anglicized (verandah).  It's not going to work for the parts of English which are derived from Latin (fungus, vox) or Greek or any of the other loan languages the English empire gifted us with.
Title: Re: Glossary plural terms
Post by: KP on May 08, 2018, 11:17:09 am
So the Pareto Principle suggests that if 80% of plurals are formed by adding 's' to a noun then finding a simple solution to 's' plurals could be an easy win.

First attempt: If a word ends in 's' and it's in the glossary, show that glossary item. If a word ends in 's' and it isn't in the glossary, look for an entry with the 's' removed and show that glossary item. This only fails when there is a glossary term 'xyz' for which 'xyzs' is a real word that isn't the plural of 'xyz', and isn't itself a glossary term. Probably not too many of those, but enough to be annoying?

That only works for the sub-set of English that is Germanic in origin, is"regular", or has been completely Anglicized (verandah).  It's not going to work for the parts of English which are derived from Latin (fungus, vox) or Greek or any of the other loan languages the English empire gifted us with.

Yeah well don't blame me, blame that Pareto bloke  ;)
Title: Re: Glossary plural terms
Post by: Paolo F Cantoni on May 08, 2018, 11:56:40 am
We may have been thinking about this the wrong way...

If we allow a number (say 5) of variants (why they are variants is our business), we can place the "Root Term" as the Domain key for the record and provide the other variants - all of which should map to the same definition.  We can require that each root and variant appear only once in the set.

Then if any term in the set appears in the notes, the definition is mapped.  It would be nice to have two definitions - the 25 word or less concise definition and a more expansive description which could be accessed once the shorter definition has been displayed.

We can populate the entries to our needs.

Paolo
Title: Re: Glossary plural terms
Post by: Glassboy on May 08, 2018, 12:20:02 pm
If we allow a number (say 5) of variants (why they are variants is our business), we can place the "Root Term" as the Domain key for the record and provide the other variants - all of which should map to the same definition.  We can require that each root and variant appear only once in the set.

By variants do you mean alternate definitions and pluralisation for the same term?  If so why should it be limited to a number?  There also needs to be synonyms and their pluralisation.
Title: Re: Glossary plural terms
Post by: Paolo F Cantoni on May 08, 2018, 03:51:25 pm
If we allow a number (say 5) of variants (why they are variants is our business), we can place the "Root Term" as the Domain key for the record and provide the other variants - all of which should map to the same definition.  We can require that each root and variant appear only once in the set.

By variants do you mean alternate definitions and pluralisation for the same term?  If so why should it be limited to a number?  There also needs to be synonyms and their pluralisation.
I mean variants of the term not of the definition.  And yes, there should be no limit on the number of mappings allowed.  In my view, it's a many to one mapping.

You can include any variants you like, singular, plural, singural (my creation), synonym etc. etc.  The key point is for THIS term I want THAT definition.  And for those terms that have more than one definition, you need to aggregate them as do dictionaries.

Paolo
Title: Re: Glossary plural terms
Post by: michielper on May 08, 2018, 09:23:37 pm
We may have been thinking about this the wrong way...

If we allow a number (say 5) of variants (why they are variants is our business), we can place the "Root Term" as the Domain key for the record and provide the other variants - all of which should map to the same definition.  We can require that each root and variant appear only once in the set.

Then if any term in the set appears in the notes, the definition is mapped.  It would be nice to have two definitions - the 25 word or less concise definition and a more expansive description which could be accessed once the shorter definition has been displayed.

We can populate the entries to our needs.

Paolo

I like that suggestion. This puts the responsibility of defining which words (let's call them synonyms) should point to a particular glossary entry completely with the user, where it should be. The simple implementation, which would be good enough for me, is to have to specify each "synonym" explicitly. A more advanced implementation would allow the user to specify a (regular expression) pattern.
Implementation in EA should not be complex but will be extremely helpful!

And, another question, would it be possible to realise this in an add-in? That is, does EA call an overloadable function before a glossary look up and before highlighting terms?
Title: Re: Glossary plural terms
Post by: Uffe on May 09, 2018, 12:27:28 am
And, another question, would it be possible to realise this in an add-in? That is, does EA call an overloadable function before a glossary look up and before highlighting terms?
Unfortunately not. There are callbacks which can catch the creation / deletion of a glossary term, but the lookup and highlighting are EA-internal.

/Uffe
Title: Re: Glossary plural terms
Post by: Glassboy on May 09, 2018, 08:38:29 am
A more advanced implementation would allow the user to specify a (regular expression) pattern.

That's an interesting idea.  By extension it would be useful to be able to import a specific glossary and an accompanying regex set.  I'm thinking for example of frameworks like FIBO.
Title: Re: Glossary plural terms
Post by: Paolo F Cantoni on May 09, 2018, 12:21:06 pm
A more advanced implementation would allow the user to specify a (regular expression) pattern.

That's an interesting idea.  By extension, it would be useful to be able to import a specific glossary and an accompanying regex set.  I'm thinking for example of frameworks like FIBO.
How would the RegEx be used?  I fear this might be a chimaera.  I can see RegExs populating a trial set of variants, but then - especially for a language like English - the output would need to be adjusted for the "Exceptions that prove the rule".  The adjusted output is what would be passed to EA.

Paolo

Title: Re: Glossary plural terms
Post by: Glassboy on May 09, 2018, 12:45:07 pm
How would the RegEx be used?  I fear this might be a chimaera.  I can see RegExs populating a trial set of variants, but then - especially for a language like English - the output would need to be adjusted for the "Exceptions that prove the rule".  The adjusted output is what would be passed to EA.

Wouldn't an exception that proves the rule simply be just a missing definition?  Wouldn't having a missing definition be a case of ambiguity that you would want to fix rather than hide?
Title: Re: Glossary plural terms
Post by: Paolo F Cantoni on May 09, 2018, 04:02:57 pm
How would the RegEx be used?  I fear this might be a chimaera.  I can see RegExs populating a trial set of variants, but then - especially for a language like English - the output would need to be adjusted for the "Exceptions that prove the rule".  The adjusted output is what would be passed to EA.

Wouldn't an exception that proves the rule simply be just a missing definition?  Wouldn't having a missing definition be a case of ambiguity that you would want to fix rather than hide?
Now you've lost me (probably my bad).  Can you specify how exactly the RegEx would be used?  I didn't think it would be for the definitions.

Paolo
Title: Re: Glossary plural terms
Post by: michielper on May 10, 2018, 12:19:31 am
And, another question, would it be possible to realise this in an add-in? That is, does EA call an overloadable function before a glossary look up and before highlighting terms?
Unfortunately not. There are callbacks which can catch the creation / deletion of a glossary term, but the lookup and highlighting are EA-internal.

/Uffe

Allright, but the Paolo idea should then certainly be implemented by Sparx!
Title: Re: Glossary plural terms
Post by: Glassboy on May 10, 2018, 07:23:07 am
Now you've lost me (probably my bad).  Can you specify how exactly the RegEx would be used?  I didn't think it would be for the definitions.

Well I assumed that something like

Code: [Select]
voice|voice|vox|voces
would be used to link to an entry voice for the word, its plural and any synonyms.

By an exception that proves the rule I assumed you meant something like your glossary doesn't not define "voice" as "a particular opinion" in addition to its other meanings.
Title: Re: Glossary plural terms
Post by: Paolo F Cantoni on May 10, 2018, 10:21:11 am
Now you've lost me (probably my bad).  Can you specify how exactly the RegEx would be used?  I didn't think it would be for the definitions.

Well I assumed that something like

Code: [Select]
voice|voice|vox|voces
would be used to link to an entry voice for the word, its plural and any synonyms.

By an exception that proves the rule I assumed you meant something like your glossary doesn't define "voice" as "a particular opinion" in addition to its other meanings.
No, I meant that each set of variants couldn't be managed by a RegEx.  The problem of multiple meanings for the same word is a different one.

As I said, one can certainly use RegExs to start the process, but they aren't enough.

Paolo
Title: Re: Glossary plural terms
Post by: Glassboy on May 10, 2018, 01:55:52 pm
No, I meant that each set of variants couldn't be managed by a RegEx.  The problem of multiple meanings for the same word is a different one.
As I said, one can certainly use REgExs to start the process, but they aren't enough.

I went back and read your definition of variants and I'm struggling.  But then again I'm not suggesting regex is the whole suggestion.

I guess we need a Venn (https://www.pinterest.co.uk/pin/448248969142492583/) diagram or something.
Title: Re: Glossary plural terms
Post by: Eve on May 11, 2018, 02:26:25 pm
The best way EA could handle this in the future is to model the glossary using an ontology definition profile. EA could then query the model itself for the glossary terms to highlight and the definitions to display.
Title: Re: Glossary plural terms
Post by: Paolo F Cantoni on May 11, 2018, 03:45:00 pm
The best way EA could handle this in the future is to model the glossary using an ontology definition profile. EA could then query the model itself for the glossary terms to highlight and the definitions to display.
+100

But first, ask us what we think we might need.  Or even how we envision the solution.

FWIW, as you know, I've had nearly a decade of creating and using ontological models in Sparx EA.  I'm sure there are other users with similar experience and we could "Crowdsource" the requirements / envisioned solution.  I say envisioned because Sparx is the owner of the actual solution, but in communicating our thoughts, the specification of an envisioned solution may help clarify matters.

Paolo
Title: Re: Glossary plural terms
Post by: qwerty on May 11, 2018, 05:13:47 pm
Honestly, that's exactly what I do in projects. The gimmick with the highligh does not work, but having a working and extendable glossary is what brings the real value. Would be nice to have the highlighting, but then again you get weird results since all those algorithms do a pure string check which fails anyway in certain cases (you find that in some web pages where strings get highlighted from a glossary). For example if you have acronyms that resemble natural words.

q.