---
title: "Overview"
description: "Use the parser-neutral core to build segments, validate translations and work with records."
canonical_url: "https://diglot.sh/core/overview"
---
# Overview

> Use the parser-neutral core to build segments, validate translations and work with records.

`@diglot/core` is the parser-neutral center of diglot. It defines the segment model, the placeholder form and hashing, translation validation, the helpers that adapters use to apply translations, segment and sentence diffs, translation records, and the policy, glossary and config types. It has no markdown parser dependency: [adapters](https://diglot.sh/adapters/overview) such as comark and mdast produce segments for it.

<package-info directory="packages/core" name="@diglot/core">



</package-info>

The core imports no Node built-ins, so it runs in browsers and edge runtimes as well as Node.js. That makes it possible to validate or apply translations in a worker that serves your documentation.

## What is exported

<table>
<thead>
  <tr>
    <th>
      Area
    </th>
    
    <th>
      Exports
    </th>
    
    <th>
      Page
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      Segments
    </td>
    
    <td>
      <code>
        buildSegment
      </code>
      
      , <code>
        buildSegments
      </code>
      
      , <code>
        prepareSegment
      </code>
      
      , <code>
        hashSkeleton
      </code>
      
      , skeleton helpers, <code>
        pseudoTranslate
      </code>
    </td>
    
    <td>
      <a href="https://diglot.sh/core/segments">
        Segments
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      Validation
    </td>
    
    <td>
      <code>
        validate
      </code>
      
      , <code>
        lengthRatio
      </code>
      
      , <code>
        maxTranslationLength
      </code>
    </td>
    
    <td>
      <a href="https://diglot.sh/core/validation">
        Validation
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      Applying
    </td>
    
    <td>
      <code>
        resolveTranslation
      </code>
      
      , <code>
        createSegmentEvent
      </code>
      
      , <code>
        wordsByStatus
      </code>
      
      , <code>
        createReport
      </code>
      
      , <code>
        tally
      </code>
    </td>
    
    <td>
      <a href="https://diglot.sh/core/apply">
        Apply
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      Diffing
    </td>
    
    <td>
      <code>
        diffSegments
      </code>
      
      , <code>
        similarity
      </code>
      
      , <code>
        sentenceDiff
      </code>
      
      , <code>
        splitSentences
      </code>
    </td>
    
    <td>
      <a href="https://diglot.sh/core/diffing">
        Diffing
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      Records
    </td>
    
    <td>
      <code>
        parseRecord
      </code>
      
      , <code>
        createRecord
      </code>
      
      , <code>
        normaliseRecord
      </code>
      
      , <code>
        recordStatus
      </code>
      
      , <code>
        editRatio
      </code>
    </td>
    
    <td>
      <a href="https://diglot.sh/core/records">
        Records
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      Review
    </td>
    
    <td>
      <code>
        editRecord
      </code>
      
      , <code>
        verifyRecord
      </code>
      
      , <code>
        rejectRecord
      </code>
    </td>
    
    <td>
      <a href="https://diglot.sh/core/review">
        Review
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      Configuration
    </td>
    
    <td>
      <code>
        defineConfig
      </code>
      
      , <code>
        defaultPolicy
      </code>
      
      , <code>
        resolvePolicy
      </code>
      
      , <code>
        snapshotPolicy
      </code>
      
      , <code>
        restorePolicy
      </code>
      
      , glossary and style types
    </td>
    
    <td>
      <a href="https://diglot.sh/core/policy-and-config">
        Policy and config
      </a>
    </td>
  </tr>
</tbody>
</table>

## Who uses it

You use the core directly when you write an adapter for another markdown parser, when you validate or apply translations in your own renderer, or when you work with records. If you only run the workflow, the [CLI](https://diglot.sh/workflow/cli/overview) and the [Action](https://diglot.sh/workflow/action/overview) use it for you.


## Sitemap

See the full [sitemap](https://diglot.sh/sitemap.md) for all pages.
