<commit_before># --------
# metadata: annotations.csv references.csv library.csv insertions.csv
# --------

profile: data-package
resources:
  - encoding: utf-8-sig
    format: csv
    hashing: md5
    name: annotations
    path: annotations.csv
    profile: tabular-data-resource
    description: A collection of all written annotations in <NAME>'s library
    schema:
      primaryKey: id
      foreignKeys:
        - fields: book_id
          reference: 
            resource: library
            fields: id
      fields:
        - name: id
          type: string
          description: Unique identifier linking to the annotation's page
          format: uri
          constraints:
            required: true
            unique: true
        - name: book_id
          type: string
          format: uri
          description: Link to the book where the annotation was found
        - name: book_title
          type: string
          description: Title of the book where the annotation was found
        - name: book_type
          type: string
          description: Whether the work is a full book or a section of a book. 
          constraints:
            pattern: "Book|Book Section"
        - name: page
          type: string
          description: The page where the annotation was found # QUESTION: What do brackets mean?
        - name: tags
          type: string
          description: Supplemental information about the annotation (e.g. blue ink, arrow)
        - name: text_content
          type: any
          description: Words included in the annotation
        - name: text_language
          type: any
          description: The language used in the annotation
        - name: text_language_code
          type: any
          description: The ISO 639-1 codes for the language used in the annotation
        - name: text_translation
          type: any
          description: 'Translation of the annotation text'
        - name: quote_content
          type: string
          description: The book's text that was highlighted or underlined by the given annotation
        - name: quote_language
          type: string
          description: The language of the book's text that was highlighted by the annotation
        - name: quote_language_code
          type: string
          description: The ISO 639-1 codes for the book's text that was highlighted by the annotation
        - name: annotator
          type: string
          description: The person who made the annotation # QUESTION: Add language about certainty? How did we know this?
        - name: annotation_region
          type: string
          description: IIIF image region for the portion of the book page that contains the annotation
          constraints:
            unique: true
        - name: page_iiif
          type: string
          description: IIIF image for the book page that includes the annotation
    scheme: file
  - encoding: utf-8-sig
    format: csv
    hashing: md5
    name: references
    path: references.csv
    description: References to other works made in <NAME>'s 1967 book De la grammatologie
    profile: tabular-data-resource
    schema:
      foreignKeys:
        - fields: book_id
          reference: 
            resource: library
            fields: id
      fields:
        - name: id
          type: string
          description: An identifier linking to the reference's detail page. Note that these are not unique.
          constraints:
            required: true
        - name: page
          type: integer
          description: The page in De la grammatologie where the reference was cited
          constraints:
            required: true
        - name: page_location
          type: string
          description: 'Alpha identifiers for the references in the order they occur on the page'
          constraints:
            required: true
        - name: type
          type: string
          description: Type of reference (e.g. footnote, a quotation, etc.)
          constraints:
            required: true
            pattern: "Footnote|Epigraph|Citation|Quotation"
        - name: book_title
          type: string
          description: The title of the book referenced
          constraints:
            required: true
        - name: book_id
          type: string
          format: uri
          description: Link to the book where the reference was found
          constraints:
            required: true
        - name: book_page
          type: string
          description: Page of the book in Derrida's citation
        - name: book_type
          type: string
          description: Whether or not the reference is to a book or journal article
          constraints:
            required: true
            pattern: Book|Journal Article
        - name: anchor_text
          type: string
          description: The text of the quotation or the footnote that makes up the reference
        - name: interventions
          type: any
          description: A URI to the linked annotation (if Derrida had a book where this reference was annotated.)
          # ?: Is this accurate
        - name: section
          type: string
          description: Section of De la grammatologie where the reference is located
          constraints:
            pattern: Part 1|Part 2
          constraints:
            required: true
        - name: chapter
          type: string
          description: Chapter of De la grammatologie where the reference is located
    scheme: file
  - encoding: utf-8-sig
    format: csv
    hashing: md5
    name: library
    path: library.csv
    description: Books from Derrida's personal library
    profile: tabular-data-resource
    schema:
      primaryKey: id
      foreignKeys:
        # Frictionless Data doesn't seem to run tests on self-referencing foreign keys.
        #  Whether all of collected_work_uri exists in the id column was checked manually.
        #  When introducing an error into the dataset, Frictionless Data could not detect it.
        #  https://specs.frictionlessdata.io/table-schema/#foreign-keys
        - fields: collected_work_uri
          reference:
            resource: ""
            fields: id
      fields:
        - name: id
          type: string
          format: uri
          description: Unique link to the book's detail page
          constraints:
            required: true
            unique: true
        - name: item_type
          type: string
          description: The type of work (either a book, journal article, or book section)
          constraints:
            pattern: Book|Journal Article|Book Section
          constraints:
            required: true
        - name: title
          type: string
          description: Title of the given work
          constraints:
            required: true
        - name: alternate_title
          type: any
          description: Alternate title, if different from the work title (e.g. for translations)
        - name: work_year
          type: integer
          description: Year in which the work was published
        - name: copyright_year
          type: integer
          description: Year in which the work was copyrighted
        - name: print_date
          type: any
          description: Printing date for this specific edition 
        - name: authors
          type: string
          description: Authors of the work
        - name: contributors
          type: any
          description: Known contributors to the work (e.g translators or editors)
        - name: publisher
          type: string
          description: Publisher of the work
        - name: pub_place
          type: string
          description: City in which the work was published
        - name: is_extant
          type: boolean
          description: Work exists in Derrida's library # ?
          constraints:
            required: true
        - name: is_annotated
          type: boolean
          description: The instance was annotated
          constraints:
            required: true
        - name: is_translation
          type: boolean
          description: The work is a translation
          constraints:<commit_msg>Remove copyright_year description<commit_after># --------
# metadata: annotations.csv references.csv library.csv insertions.csv
# --------

profile: data-package
resources:
  - encoding: utf-8-sig
    format: csv
    hashing: md5
    name: annotations
    path: annotations.csv
    profile: tabular-data-resource
    description: A collection of all written annotations in Jacques Derrida's library
    schema:
      primaryKey: id
      foreignKeys:
        - fields: book_id
          reference: 
            resource: library
            fields: id
      fields:
        - name: id
          type: string
          description: Unique identifier linking to the annotation's page
          format: uri
          constraints:
            required: true
            unique: true
        - name: book_id
          type: string
          format: uri
          description: Link to the book where the annotation was found
        - name: book_title
          type: string
          description: Title of the book where the annotation was found
        - name: book_type
          type: string
          description: Whether the work is a full book or a section of a book. 
          constraints:
            pattern: "Book|Book Section"
        - name: page
          type: string
          description: The page where the annotation was found # QUESTION: What do brackets mean?
        - name: tags
          type: string
          description: Supplemental information about the annotation (e.g. blue ink, arrow)
        - name: text_content
          type: any
          description: Words included in the annotation
        - name: text_language
          type: any
          description: The language used in the annotation
        - name: text_language_code
          type: any
          description: The ISO 639-1 codes for the language used in the annotation
        - name: text_translation
          type: any
          description: 'Translation of the annotation text'
        - name: quote_content
          type: string
          description: The book's text that was highlighted or underlined by the given annotation
        - name: quote_language
          type: string
          description: The language of the book's text that was highlighted by the annotation
        - name: quote_language_code
          type: string
          description: The ISO 639-1 codes for the book's text that was highlighted by the annotation
        - name: annotator
          type: string
          description: The person who made the annotation # QUESTION: Add language about certainty? How did we know this?
        - name: annotation_region
          type: string
          description: IIIF image region for the portion of the book page that contains the annotation
          constraints:
            unique: true
        - name: page_iiif
          type: string
          description: IIIF image for the book page that includes the annotation
    scheme: file
  - encoding: utf-8-sig
    format: csv
    hashing: md5
    name: references
    path: references.csv
    description: References to other works made in <NAME>'s 1967 book De la grammatologie
    profile: tabular-data-resource
    schema:
      foreignKeys:
        - fields: book_id
          reference: 
            resource: library
            fields: id
      fields:
        - name: id
          type: string
          description: An identifier linking to the reference's detail page. Note that these are not unique.
          constraints:
            required: true
        - name: page
          type: integer
          description: The page in De la grammatologie where the reference was cited
          constraints:
            required: true
        - name: page_location
          type: string
          description: 'Alpha identifiers for the references in the order they occur on the page'
          constraints:
            required: true
        - name: type
          type: string
          description: Type of reference (e.g. footnote, a quotation, etc.)
          constraints:
            required: true
            pattern: "Footnote|Epigraph|Citation|Quotation"
        - name: book_title
          type: string
          description: The title of the book referenced
          constraints:
            required: true
        - name: book_id
          type: string
          format: uri
          description: Link to the book where the reference was found
          constraints:
            required: true
        - name: book_page
          type: string
          description: Page of the book in Derrida's citation
        - name: book_type
          type: string
          description: Whether or not the reference is to a book or journal article
          constraints:
            required: true
            pattern: Book|Journal Article
        - name: anchor_text
          type: string
          description: The text of the quotation or the footnote that makes up the reference
        - name: interventions
          type: any
          description: A URI to the linked annotation (if Derrida had a book where this reference was annotated.)
          # ?: Is this accurate
        - name: section
          type: string
          description: Section of De la grammatologie where the reference is located
          constraints:
            pattern: Part 1|Part 2
          constraints:
            required: true
        - name: chapter
          type: string
          description: Chapter of De la grammatologie where the reference is located
    scheme: file
  - encoding: utf-8-sig
    format: csv
    hashing: md5
    name: library
    path: library.csv
    description: Books from Derrida's personal library
    profile: tabular-data-resource
    schema:
      primaryKey: id
      foreignKeys:
        # Frictionless Data doesn't seem to run tests on self-referencing foreign keys.
        #  Whether all of collected_work_uri exists in the id column was checked manually.
        #  When introducing an error into the dataset, Frictionless Data could not detect it.
        #  https://specs.frictionlessdata.io/table-schema/#foreign-keys
        - fields: collected_work_uri
          reference:
            resource: ""
            fields: id
      fields:
        - name: id
          type: string
          format: uri
          description: Unique link to the book's detail page
          constraints:
            required: true
            unique: true
        - name: item_type
          type: string
          description: The type of work (either a book, journal article, or book section)
          constraints:
            pattern: Book|Journal Article|Book Section
          constraints:
            required: true
        - name: title
          type: string
          description: Title of the given work
          constraints:
            required: true
        - name: alternate_title
          type: any
          description: Alternate title, if different from the work title (e.g. for translations)
        - name: work_year
          type: integer
          description: Year in which the work was published
        - name: copyright_year
          type: integer
        - name: print_date
          type: any
          description: Printing date for this specific edition 
        - name: authors
          type: string
          description: Authors of the work
        - name: contributors
          type: any
          description: Known contributors to the work (e.g translators or editors)
        - name: publisher
          type: string
          description: Publisher of the work
        - name: pub_place
          type: string
          description: City in which the work was published
        - name: is_extant
          type: boolean
          description: Work exists in Derrida's library # ?
          constraints:
            required: true
        - name: is_annotated
          type: boolean
          description: The instance was annotated
          constraints:
            required: true
        - name: is_translation
          type: boolean
          description: The work is a translation
          constraints:
{'fraction_non_alphanumeric': 0.04958728217670437, 'fraction_numerical': 0.0024457352491592784, 'mean_word_length': 1.7433747064743375, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2602712', 'n_tokens_mistral': 3841, 'n_tokens_neox': 3700, 'n_words': 1642}