| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Harmonic.Rules.Import.CSV
Description
Parses Yale Classical Archives Corpus data from CSV format into typed Haskell records for downstream transformation and graph storage.
Synopsis
- data YCACLRow = YCACLRow {
- yrComposer :: !Text
- yrPiece :: !Text
- yrOrder :: !Int
- yrPitches :: ![Int]
- yrFundamental :: !Int
- type ComposerId = Text
- type PieceId = Text
- type YCACLData = Map ComposerId (Map PieceId [ChordSlice])
- loadYCACLData :: FilePath -> IO YCACLData
Corpus rows
One row of the YCACL artifact exported by scripts/export_ycacl.R.
The CSV carries pitches as a space-separated string in a single column; the
FromNamedRecord instance splits and parses that into yrPitches.
Constructors
| YCACLRow | |
Fields
| |
Nested corpus map
type ComposerId = Text Source #
Composer name, used as the outer key of YCACLData. Case is preserved
here; composer matching is case-insensitive and happens downstream.
type YCACLData = Map ComposerId (Map PieceId [ChordSlice]) Source #
The whole corpus, grouped composer then piece, with each piece reduced to its ordered list of slices.