Best systemic solution for name order variations — a new "compare" type?

  • if it helps finding a code pattern this is very similar to “stop words”
    • Removing the and etc… from text to retain the keywords.
    • Except in this case you remove von./jr etc… but detect they belong to the name and add them back, in the appropriate place.

Virtual tiddlers

I had not seen @Mohammad’s virtual tiddler approach, and not yet worked out the full mechanism which I imagine is based on missing tiddlers. What if we could create “virtual tiddlers” using variables, no need for an action widget or trigger?

  • this could allow us to define macros and tiddlers on the fly without user interaction.
  • Then have a mechanisium connected to the save or logout triggers that optionally commit them to real tiddlers.
  • Recent work to intercept the link widget for [[tiddler links]] and CameLcAse for tiddlers that don’t yet exist would help here.

Wow. The mind boggles.

If you get to removing diacritical marks, I think you may hit a wall in wikitext, unless your function handles a whole lot of independent cases. But if that can run in pure JS, then it’s reasonably simple:

const removeDiacriticals = (s) => s.normalize("NFD").replace(/[\u0300-\u036f]/g, "")

This first converts accented letters into two separate characters, a base character and an accent character. Then it removes all accent characters.

G a b r i e l   G a r c í a   M á r q u e z
G a b r i e l   G a r c i ́ a   M a ́ r q u e z
G a b r i e l   G a r c i a   M a r q u e z

We could replace normalize('NFD') with normalize('NFKD') if we also wanted to separate out ligatures, like

"fi" -> "f" + "i"

but I don’t think I’ve ever seen them in names.

There’s more information on Wikipedia.

I’m slowly getting there myself. I keep assuming they’re just like functions in a programming language, and shooting myself in the foot. They’re similar, but by no means the same.

1 Like

Feel free to ask me, I have already become fairly well versed in them, having put at least 40hours into researching, tweaking and driving them hard. In part because they solve at least 5 problems that always annoyed me and I really love them.

2 Likes

This is very crude idea:

  • I assume a bibliographic record is stored as a tiddler (TW bibtex plugin uses this approach)
  • You can use a viewtemplate to show the bibliographic tiddler in your desired form and style
  • In the view template write wikitext solution to do the job and create the dynamic table or create the drop down when you click author name

What code shall do in:

  • collect all records for that author (no matter how his/her name is stored)
  • create the drop down on click or generate a dynamic table
  • the challenge is to correctly identify the author if name comes in different formats
  • a procedure can be used to show author in other content as a button/link on click shows info

@TW_Tones pointed to some functions to treat different name formats

Hi @CodaCoder
Please keep this open. I will create a PR to report virtual tiddler as a feature in documentation. Then I will create a new thread and this post can link to that.

I’m baffled by this question… virtual tiddlers don’t need to be created. If you open a “missing” tiddler in the story river, nothing is “created”; it’s just that a tiddler frame with appropriate view templates (as determined by cascade filters) appears in that spot… :thinking: Do you mean that virtual tiddlers would appear in a wiki even without the simple action of being “opened”? (I’m not sure why, or how one would decide which of the quite genuinely infinite number of missing-tiddler-title-strings to open without some action triggering it…? Of course, I have used permalinks (and or query-strings) to help visitors open a web-hosted wiki with “missing” tiddlers (as an appropriate customized “landing-page”, but that’s still a kind of action).

Of course, you can always create a tiddler for any “missing” tiddler (by editing it and adding any info). But if doing so would not add info beyond the helpful structural road-signs and transclusions that already can be summarized in a virtual tiddler, then there’s no need to burden your wiki with another line of json. (But again, I wonder if I’m missing something that you have in mind.)

Yes, this is exactly what I’ve been modeling in my mockup so far… And I do think dynamic tables in a virtual “missing” tiddler are the most powerful tool for this role! :slight_smile:

^ THIS is the hard part.

I understand any solution here will always be some kind of approximation, given that bibtex data “from the wild” may come in with various degrees of messy or incomplete data, and we’ll never have a perfect or complete list of all the ways that names can surprise us. :upside_down_face:

On thing I want to clarify is that my intention is to have the solution find compatible names for each author name as it appears in the tiddler being viewed (in other words, the tiddler from which one accesses the link to the author-overview tiddler).

One consequence of this approach is that it will be asymmetrical (unlike the solution that @Scott_Sauyet was building above in this thread). If you click on Martha Craven Nussbaum, you’ll get a virtual tiddler (or popup, or whatever) that finds exact matches plus all the “weaker” versions of her name, pretty much guaranteed to rule out false positives. But if you click on “M Nussbaum” the list will necessarily be less constrained, so the filter based on that string will easily include other authors, assuming there are bibtex-author fields listing Mary Nussbaum or Martha Helen Nussbaum, etc.).

This kind of solution is an “interim” one. A robust and well-supported biblio database should want eventually to standardize names and/or implement an author ID system. (Also, this system will be calculation-intensive compared to a simpler match, so over time performance will suffer, and benefits dwindle.) The purpose is to make the database useful even before such standardization has been achieved (and when an influx of new “wild” data comes in).

Yes, I suspect that either regex or going straight to javascript would make a tremendous difference in the manageability of this task!

First, although I am commenting on the concept of virtual tiddlers, keep in mind its relevance to the OT.

  • As soon as you have links to alternate “name order variations” you in effect can list/search them and even find out where they are defined, with backlinks.
  • I am not talking about saving or creating tiddlers. Just that point at which they come into existence. Such that they are named, observed or useable.

Yes, It is not always about the user and the the user interface, there are useful cases where we want lists, possible titles, compound titles, and more to exist, some of which we shove into temp or state tiddlers that could also exist in virtual tiddler titles.

  • Sure that title may have to exist in some text some where [[my virtual tiddler]]
  • At a minimum you could prefix such titles, but if your code creates them it can also take them away. A tile search may be sufficient eg “surname”:

Perhaps an extension of Exploring default tiddler links hackability in V5.3.0 to add features to missing tiddler titles, our virtual tiddlers. Especially with reference back to where they come into existence, or subsequently linked to.