Code Monkey home page Code Monkey logo

think-big-act-localhost's Introduction

Think Big, Act Localhost

This repository provides a handful of small examples to complement a presentation of the same name at the 2024 code4lib conference.

Reserialize

Given a set of MARC records, reserialize those records as "merge candidates" as described in the presentation. A merge candidate record consists of the format:

{HASHED_MERGE_KEY} {TAB_DELIMITER_CHAR} {JSON_OBJECT}

Cluster

The clustering example provides a demonstration of converting reserialized merge candidate records into finalized record clusters.

$ head data/merge_candidates.tsv 
000000670195b57a802f06cebc7a0f6af8e4d4aa	{"id":"1", "mergeIds":["isbn:123"],             "marc": "MARC_BINARY_1", "type":"Electronic"}
000000670195b57a802f06cebc7a0f6af8e4d4aa	{"id":"2", "mergeIds":["isbn:456"],             "marc": "MARC_BINARY_2", "type":"Electronic"}
000000670195b57a802f06cebc7a0f6af8e4d4aa	{"id":"3", "mergeIds":["isbn:123", "isbn:456"], "marc": "MARC_BINARY_3", "type":"Print"}
000000670195b57a802f06cebc7a0f6af8e4d4aa	{"id":"4", "mergeIds":["isbn:789"],             "marc": "MARC_BINARY_4", "type":"Electronic"}
000000670195b57a802f06cebc7a0f6af8e4d4aa	{"id":"5", "mergeIds":["isbn:123"],             "marc": "MARC_BINARY_5", "type":"Microform"}
ee95d64ee7ffaf709dc4fe772ce081938f5bef6a	{"id":"6", "mergeIds":[],                       "marc": "MARC_BINARY_6", "type":"Print"}
ee95d64ee7ffaf709dc4fe772ce081938f5bef6a	{"id":"7", "mergeIds":["issn:987"],             "marc": "MARC_BINARY_7", "type":"Electronic"}
$ ruby main.rb 
$ head data/record-clusters.jsonl 
[{"id":"1","mergeIds":["isbn:123"],"marc":"MARC_BINARY_1","type":"Electronic"},{"id":"3","mergeIds":["isbn:123","isbn:456"],"marc":"MARC_BINARY_3","type":"Print"},{"id":"5","mergeIds":["isbn:123"],"marc":"MARC_BINARY_5","type":"Microform"},{"id":"2","mergeIds":["isbn:456"],"marc":"MARC_BINARY_2","type":"Electronic"}]
[{"id":"4","mergeIds":["isbn:789"],"marc":"MARC_BINARY_4","type":"Electronic"}]
[{"id":"6","mergeIds":[],"marc":"MARC_BINARY_6","type":"Print"}]
[{"id":"7","mergeIds":["issn:987"],"marc":"MARC_BINARY_7","type":"Electronic"}]

think-big-act-localhost's People

Contributors

steve-meyer avatar

Stargazers

Tomek avatar

Watchers

 avatar

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.