Compare commits
No commits in common. 'a93544a9c3a87c6a3ad379ca201c9902e997d447' and 'd15d9cf3e5a843d137ee02b6dabd804479b58443' have entirely different histories.
a93544a9c3
...
d15d9cf3e5
@ -1,22 +1,24 @@
|
||||
# Change Log
|
||||
All notable changes to this project will be documented in this file. This change log follows the conventions of [keepachangelog.com](http://keepachangelog.com/).
|
||||
|
||||
## [0.1.3] - 2021-05-02
|
||||
### Fixed
|
||||
- Fixed bug sylalbifying words that begin with consonants that don't adhere to sonority heirarchy.
|
||||
- "Steel", for example. "T" is less sonorous than "S" and typically wouldn't be included in an onset, but since there are no vowels preceding the "ST" then both *should* be included in the onset.
|
||||
## [Unreleased]
|
||||
### Changed
|
||||
- Add a new arity to `make-widget-async` to provide a different widget shape.
|
||||
|
||||
## [0.1.2] - 2021-04-22
|
||||
### Fixed
|
||||
- Fixed bug when getting phones from CMULexicon because the word wasn't found in the CMU dictionary. (Missing parens)
|
||||
- Comment out warn-on-reflection code that was just being used to find performance gains.
|
||||
## [0.1.1] - 2021-04-22
|
||||
### Changed
|
||||
- Documentation on how to make the widgets.
|
||||
|
||||
## 0.1.1
|
||||
### Added
|
||||
### Removed
|
||||
- `make-widget-sync` - we're all async, all the time.
|
||||
|
||||
Initial release
|
||||
### Fixed
|
||||
- Fixed widget maker to keep working when daylight savings switches over.
|
||||
|
||||
- Phonetics and syllabification utilities
|
||||
## 0.1.0 - 2021-04-22
|
||||
### Added
|
||||
- Files from the new template.
|
||||
- Widget maker public API - `make-widget-sync`.
|
||||
|
||||
[Unreleased]: https://github.com/com.owoga/phonetics/compare/0.1.2...HEAD
|
||||
[0.1.1]: https://github.com/com.owoga/phonetics/compare/0.1.1...0.1.2
|
||||
[Unreleased]: https://github.com/com.owoga/phonetics/compare/0.1.1...HEAD
|
||||
[0.1.1]: https://github.com/com.owoga/phonetics/compare/0.1.0...0.1.1
|
||||
|
Binary file not shown.
@ -1,64 +0,0 @@
|
||||
(ns com.owoga.phonetics.stress-manip
|
||||
(:require [clojure.string :as string]))
|
||||
|
||||
(defn primary-stress?
|
||||
[phone]
|
||||
(re-find #"1" phone))
|
||||
|
||||
(defn non-primary-stress?
|
||||
[phone]
|
||||
(re-find #"[2-9]" phone))
|
||||
|
||||
(defn unstressed?
|
||||
[phone]
|
||||
(re-find #"0" phone))
|
||||
|
||||
(defn remove-any-stress-signifiers
|
||||
[phones]
|
||||
(map #(string/replace % #"\d" "") phones))
|
||||
|
||||
(defn remove-non-primary-stress-signifiers
|
||||
[phones]
|
||||
(map #(string/replace % #"[02-9]" "") phones))
|
||||
|
||||
(defn unify-stressed
|
||||
[phones]
|
||||
(map #(string/replace % #"[2-9]" "1") phones))
|
||||
|
||||
(def consonant-unification-map
|
||||
"This almost aligns with the phonemap that maps phones to whether they are vowels, aspirates, nasals, etc...
|
||||
Slight but possibly important difference in stops. For example, I think T and D
|
||||
are more unified than T and G; and G and K are more unifide than G and T."
|
||||
{"T" "T"
|
||||
"CH" "CH"
|
||||
"K" "K"
|
||||
"HH" "HH"
|
||||
"L" "L"
|
||||
"JH" "CH" ;; <-
|
||||
"G" "K" ;; <-
|
||||
"M" "M" ;; <-
|
||||
"S" "S"
|
||||
"Y" "Y"
|
||||
"Z" "S" ;; <-
|
||||
"R" "R"
|
||||
"F" "F"
|
||||
"B" "B"
|
||||
"SH" "CH" ;; <-
|
||||
"P" "B" ;; <-
|
||||
"V" "F" ;; <-
|
||||
"TH" "T" ;; <-
|
||||
"N" "M" ;; <-
|
||||
"DH" "T" ;; <-
|
||||
"W" "Y" ;; <-
|
||||
"ZH" "S" ;; <-
|
||||
"NG" "M" ;; <-
|
||||
"D" "T" ;; <-
|
||||
})
|
||||
|
||||
(defn unify-consonants
|
||||
[phones]
|
||||
(mapv #(get consonant-unification-map % %) phones))
|
||||
|
||||
(defn remove-unstressed-signifiers
|
||||
[phones]
|
||||
(map #(string/replace % #"0" "")))
|
Loading…
Reference in New Issue