Closed (fixed)
Project:
G2 Glossary
Version:
8.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
3 Dec 2008 at 01:14 UTC
Updated:
16 Jul 2023 at 15:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
fgmNo, this is something which has been ruled out from the module spec since its inception, because it does not work with large dictionaries, where common words would cause erroneous links to appear.
But you can find that feature in Glossary.module.
Comment #2
chawl commentedG2 may cooperate with the Glossify module I hope, as terms are nodes in fact.
http://drupal.org/project/glossify
Comment #3
clashar commentedbut it would be really nice feature to avoid inserting every time tags manually.
It could be an option to search for terms everywhere or in specific tags, for example only for
div class="g2-search-area"
I need big dictionary for several thousands terms and Glossary would do it fast.
Comment #4
fgmThere is a discussion in the G2 docs about the design choices and respective features of Glossary and G2 at http://drupal.org/node/266511
Basically, the reason why there is no automatic linking in G2 is to allow dictionaries to contain short, common, words (like "a") without having tons of spurious links appearing on every page where the word appears.
In addition, such a system has a scaling problem as the number of entries increases, with the need to match a growing number of terms with each potential fragment. And since G2 is designed for large glossaries, load needs to be accounted for.
It's basically the same choice done in MediaWiki, DokuWiki and most wikis no longer to use CamelCase to automatically link, but require a wrapper element (typically some number of [] in wikis, and a DFN element in G2).
The D7 version is likely to include several linking methods, including an optional automatic link like the one you describe, but this will be off by default (for the reasons above), and not advised for medium and large glossaries.
(side note: when you want to comment on a closed issue, reset it to active, otherwise the maintainer won't be notified about your update)
Comment #6
clashar commentedfgm,
as I understand this feature seems to appear in D7.
Is it difficult to include/backport this feature not as default, but optionally for D6? in this way users who want to use words (like "a") could just use default settings.
Comment #7
fgmThe D7 version hasn't even been started yet, so there is nothing to backport. Unless someone wants to perform that backport once the D7 version is created and/or sponsor its creation, I very much doubt that there will be any new features like this added in the D6 version.
Comment #8
clashar commentedfgm, you wrote
The D7 version is likely to include several linking methods, including an optional automatic link like the one you describe, but this will be off by default (for the reasons above), and not advised for medium and large glossaries.
could you please say if G2 for D7 has already this feature.
Comment #9
fgmNo, it does not, but it should get it at some point. See the "choosing" page at http://wiki.audean.com/g2/choosing : you are welcome to complete the chart if you have any information about the alternatives, by the way.
Comment #10
tomdisher commentedHi fgm,
Thanks for all the work you've done on G2.
It looks like my specs are outside the capability of the original glossary module. We will have many definitions, so I don't want a solution with taxonomy.
G2 is exactly what I need - minus this one killer feature. Any idea when G2 could automatically link definitions, like the original glossary module?
Would this feature be backported to D6? I'm currently stuck on 6 for a few other modules.
Thanks again in advance!
Tom
Comment #11
fgmHi tom,
Actually, not having this auto-recognition, at the time G2 was designed, was a feature: it was voluntarily opted out, in favor or explicit links.
It is definitely back on the table for the hypothetical "refactoring" version of G2, but seeing how time flies, I have no idea when this eventually see the light of day. The only thing that seems reasonably certain is that if/when it appears for D7, I will not port it back to D6, which will be nearing end of life, seeing how most new projects during the last year have been on D7, not D6.
Unless someone else does the port or wants to sponsor it, of course. But in short, don't hold your breath: auto filtering is not coming for D6 from me any time soon.
Comment #12
fgmNew features only in current dev version : bumping to 8.x.
Comment #13
fgmThe D10/D9 version, as of 8.x-1.0-alpha1, ships with a
Definitionfilter plugin replicating the legacy hook_filter handling older versions used to have.The way it has been designed is to support another
Automaticfilter plugin that will automatically (hence the name) identify words matching G2 entries and wrap them in a<dfn>element so that theDefinitionfilter can then handle them.The keys to solving the underlying issues are the discovery of Aho-Corasick (already implemented and tested in alpha1) and the idea of having a "stop list" to avoid matching G2 entries that could be false positives.
That way, when a term in the stop list still needs to be linked (as opposed to being a false positive), the author can still manually use a
<dfn>element to generate the definition link, but it will not be automatically added.Comment #14
fgmFirst step: the base filter and its configuration.
Comment #15
fgmMulti-pattern matcher and filter implemented. Need more integration testing.
Comment #16
fgmStop list handled, with different values per input format. Seems to be feature-complete.
Comment #18
fgm15 years later, merged to current dev HEAD. Thanks all.
Comment #19
fgm