Changeset 28319 for trunk/include/inflectors
- Timestamp:
- Apr 30, 2014, 8:49:36 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/inflectors/en.php
r28196 r28319 97 97 $this->er2ing = array_reverse(array( 98 98 '/ers?$/' => 'ing', 99 '/(be|draw )ers?$/' => '\0'99 '/(be|draw|liv)ers?$/' => '\0' 100 100 )); 101 101 102 102 $this->ing2er = array_reverse(array( 103 103 '/ing$/' => 'er', 104 '/(th|r|hous)ing$/' => '\0', 105 '/(be|draw)ing$/' => '\0' 104 '/(snow|rain)ing$/' => '\1', 105 '/(th|hous|dur|spr|wedd)ing$/' => '\0', 106 '/(liv|draw)ing$/' => '\0' 106 107 )); 107 108 … … 124 125 self::run($this->pluralizers, $word, $res); 125 126 self::run($this->singularizers, $word, $res); 126 self::run($this->er2ing, $word, $res); 127 $rc = self::run($this->ing2er, $word, $res); 128 if ($rc !== false) 127 if (strlen($word)>4) 129 128 { 130 self::run($this->pluralizers, $rc, $res); 129 self::run($this->er2ing, $word, $res); 130 } 131 if (strlen($word)>5) 132 { 133 $rc = self::run($this->ing2er, $word, $res); 134 if ($rc !== false) 135 { 136 self::run($this->pluralizers, $rc, $res); 137 } 131 138 } 132 139 return $res;
Note: See TracChangeset
for help on using the changeset viewer.