From 5f495c1d4ee624f9d24f03e50700e7d9a9305b73 Mon Sep 17 00:00:00 2001 From: polwex Date: Sun, 22 Jun 2025 09:33:12 +0700 Subject: m --- CLAUDE.md | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 CLAUDE.md (limited to 'CLAUDE.md') diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..40e0fb0 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,54 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## Build and Development Commands + +```bash +# Build the project +cd sorsyl && dune build + +# Run tests +cd sorsyl && dune test + +# Clean build artifacts +cd sorsyl && dune clean + +# Install dependencies (if needed) +opam install --deps-only . +``` + +## Project Architecture + +Sorsyl is an OCaml library for phonological analysis, specifically focused on sonority calculation for IPA (International Phonetic Alphabet) segments. + +### Core Components + +- **lib/sonority.ml**: Main sonority calculation logic using a decision tree based on phonological features (scale 1-9: voiceless stops to low vowels) +- **lib/feature.ml**: Phonological feature definitions and segment representation +- **lib/ipa_table.ml**: CSV data loading and IPA segment lookup functionality + +### Data Files + +The `data/` directory contains: +- `ipa_all.csv`: Main IPA character database with phonological features +- Various YAML configuration files for linguistic data (ASJP, diacritic definitions, etc.) + +### Decision Tree Sonority Scale + +The sonority calculation uses phonological features to classify segments: +- 9: Low vowels (most sonorous) +- 8: High vowels +- 7: Glides/approximants +- 6: Liquids +- 5: Nasals +- 4: Voiced fricatives +- 3: Voiceless fricatives +- 2: Voiced stops +- 1: Voiceless stops (least sonorous) + +### Development Environment + +Uses devenv.nix for development environment setup with OCaml toolchain and dependencies (csv, base, stdio libraries). + +The main executable (bin/main.ml) is currently incomplete - contains only a failwith placeholder. \ No newline at end of file -- cgit v1.2.3