Juris-M / zotero-standalone-build

Zotero Standalone build utility

Home Page:http://www.zotero.org/support/standalone

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Abbreviations: suppression

fbennett opened this issue · comments

Check with Michael on whether we can do better with jurisdiction suppression.

@rischconsulting Thanks for your mail. There were two issues around abbreviations I think.

  1. The abbrevs related to legal resources, at least (which are the important ones) are pretty much in a DIY state, in that the lists shipped with the tool are not taking effect.
  2. The new jurisdiction suppression logic requires explicit flagging of each jurisdiction (that is, suppression is not inherited).

Re (1), I think I can help here, but it will take some time. Playing with the tool, I see that an abbreviation is lost when I suppress/unsuppress an element of the jurisdiction. That bothers me, and I need to think about it. It would be alarming to me if I set a set of abbreviations and they suddenly disappeared because of a change in a separate setting. It seems like abbreviations of a jurisdiction should be tied to the underlying code-slug (which we have and can use), rather than the ephemeral visual representation. So I'll look into making that change. It might take awhile---even as I write here, I'm thinking of edge cases that will be a challenge.

Once the mapping elements for jurisdiction data are stable, I can go through the Indigo Book and set up bundled abbreviations for commonly cited Federal and state courts, which should help somewhat.

Re (2), the per-jurisdiction-code suppression logic is by intention. If suppression is inheritable (as I think it was before maybe?), cites would be losing arbitrary information that is probably be needed to compose a correct citation---for example, "2d Cir." is derived from the jurisdiction data.

There are some ways that handling jurisdiction markers can be made less cumbersome, but I'll leave this for the moment, and go back to the cave and think about it.

Thanks - feedback at this point is pretty critical. It does seem like I'm getting tangled up my thinking a bit. We:ll get it sorted though.

I'm concerned to restore your abbreviations. When you search the OS for 'abbreviations.sqlite', and visit the director(y|ies) where each is located, do you see (a) any copies that are larger than the one you have in the data directory, or (b) any copies with an extension like bak, or a number, which are larger?

@rischconsulting Thanks for checking. I wrote last night from memory, and got the name of the database file wrong. abbrevs-filter.sql it is.

If the abbreviations you want to migrate are legal abbrevs, the matches are probably not turning up because the match-text received from the processor has changed. Could you send me a copy of one of the 2mb database files as an email attachment? I can use that to confirm the expected match pattern, and to do migration testing.

Thanks again for your note on jurisdiction/court matches. You are exactly right. While putting together the 5.0-compatible version of the abbrevs filter, I made a bad assumption, relying on jurisdiction rather than the institution for rendered abbreviations. Misunderstood my own data structures.

When rendered, "jurisdiction" should only show a country name, for use in mixed-jurisdiction texts where that needs to be specified for clarity. But as a full code, the information it provides is useful only behind the scenes, to peg a given institution abbreviation to a particular jurisdictional scope. The code itself, and its descriptive string, never needs to be rendered directly. Don't know what I was thinking there.

The coding tweaks needed are not major, I think there is a good prospect for getting back on track within a few days.

Missed it, sorry. Will fetch it from my account later.

Meanwhile, I've looked at behind-the-scenes matching in 4.0 and 5.0, and it may be a simpler fix than I initially thought. In 4.0, abbrev match strings export in lowercase. In 5.0, they are case-sensitive. If the abbrevs filter does not force to lowercase internally (and I think it doesn't yet), that would explain why matches are failing. A small tweak may bring everything up for you again.

The jurisdiction-suppression issue will take some effort to set right, but that's far less worrying (from a development perspective) than the wholesale failure of matches to existing user lists.

I hope to get this fixed up within the day. I have a private trip to the US coming up (west coast), and there be paperwork and catch-up to do before departure. Feeling relieved at the moment that the most serious initial problems with the release seem to be under control.

@rischconsulting Progress this morning. I've peeked inside your abbreviations data file, and indeed the match strings are all in lowercase. That's good, and I'm glad to see that the 4.0 version of the abbrevs filter has been working that way.

So what we need is for the Abbreviations Filter to match on the basis of normalized (i.e. lowercase) data. In terms of coding, it would be quite difficult to display the original mixed-case text pulled from the fields, but match on normalized data under the hood. The reasons behind that assertion are a little bit involved, but I'm pretty certain that in 4.0, which exactly did display mixed-case and match on lowercase, behavior would have sometimes surprised the user. And we don't like surprises.

It's a fairly simple thing to fix, though. The data remains the same, since it's been stored correctly. All that's needed is to similarly normalize the match-key texts, which show through in the abbrevs edit pane. I've identified the spots in the code where that needs to happen, and built an alpha client to confirm that the revised logic actually works. There are some little things to tidy up, but I should have a test release ready in a bit.

I have appointments at Uni today, and will need to make the jump soon. But I'll push forward on this during the day, and should have a beta release out soon---and I'll test it against your database, to be sure that the fix will actually improve things for you.

@rischconsulting I think I have a client ready that will behave correctly for abbreviations. I've built it for Linux and done some initial testing. It's late hear, and I need to get some sleep. Tomorrow I'll do beta builds for Mac and Windows, and send you a link. If it looks okay, we can push it out as the next release. Here are the changes:

  1. Instead of printing the full jurisdiction, styles will be amended to print only the country name, in most cases.
  2. The Suppress bubbles in the Abbrevs Filter will offer only country names.
  3. Abbreviation keys (field values) will be normalized to lowercase for matching purposes.

It turned out to be quite a bit more work than I expected, with changes in the core client, the abbrevs filter, the styles served by the Myles plugin, and the citation processor. But I think we have a good result---here's looking forward to tomorrow.

@rischconsulting It's been awhile since Juris-M has seen a feature overhaul on this scale. Had forgotten how fun it is (seriously). A programming analog to base jumping. :-)

My idea of adding a country variable derived from jurisdiction was not a good one. There might be federal subjurisdictions (California, Tasmania, Bavaria ...) that should appear in some citation forms. So I've wound most of that change out, and I'm now running trials with a new jurisdiction-depth attribute that will allow us to limit the rendered form of jurisdiction to the country name, or extended it slightly for the (no doubt limited) cases where more information should be displayed.

Re the "suppress" functionality, limiting suppression to the country element still makes sense, I think. In the rare cases that subjurisdiction information is needed, we wouldn't want to suppress it.

Yes, I think it was working for US law, but we had some pain here with comparative law theses that needed to show jurisdiction info. I've just finished a note on the latest changes, which I'll put up when the releases go live. The client code is ready, and the Windows and Mac builds are coming up soon. Fingers cross, but I think we may finally have a stable solution that works all around.

More soon!

@rischconsulting It's out now, and a wordy post on abbreviation issues is up.

I've opened an issue for the remapping of abbreviations. Closing this, as the other issues in the thread have been covered.