Giter Site home page Giter Site logo

Comments (7)

bencomp avatar bencomp commented on August 17, 2024

I don't know of a better way to do this. We have discussed discriminating by language tags in the description identifier (i.e. #desc-[unitid]-[language tag]), which could be extended to include -manual-[ordinal number], but in the end encoding meanings explicitly using properties works better in the long run.

Checking for the 'manual designator' on replace would take hacking the persistence code, wouldn't it?

from ehri-rest.

mikesname avatar mikesname commented on August 17, 2024

I would rather put this create/merge/replace logic in the importers. I still can't think of a general way to merge the trees without appropriate knowledge of what it is we're merging. Can you write an XSLT to merge the Cegesoma multilingual EADs prior to import?

I'm going to do some experimenting to try and figure this out.

from ehri-rest.

bencomp avatar bencomp commented on August 17, 2024

I've been looking around the handlers to understand how multilingual stuff is imported currently and to me it seems that one Map per language is created although how the language of the description is determined is unclear. Merging is one option, 'caching' the language of description is what I was thinking of. I just started 'caching' the <eadid> to help create unique IDs per file - uh oh, that should be the <archdesc>'s unitid.

from ehri-rest.

mikesname avatar mikesname commented on August 17, 2024

I don't understand it either - out of interest I tried putting langcode attributes in those Cegesoma files (based on F or N) and they still all came out as nld.

I'm working on something where two bundles (such as the existing one and the one we're importing) can be merged via a strategy that can be provided (via a function object) to determine whether nodes at the same level of the tree should be preserved or replaced. Then we should be able to do something like:

  • node is a description and has the same language and is not manually created = replace

Then we could do:

build import bundle from XML
if item exists:
    get existing item bundle
    merge via above strategy
    update
else:
    create

from ehri-rest.

mikesname avatar mikesname commented on August 17, 2024

Now added a creationProcess field on Description class. Can have values IMPORT or MANUAL at present.

from ehri-rest.

bencomp avatar bencomp commented on August 17, 2024

We've made progress on this issue. Instead of (?) the creationProcess, the importer looks at the sourceFileId to discover whether a description has been imported. This includes the language.

Will look again soon.

from ehri-rest.

mikesname avatar mikesname commented on August 17, 2024

This is in theory working

from ehri-rest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.