Permalink
Browse files

Fix comments

  • Loading branch information...
1 parent 483f1ae commit 031b64d1dbd0ed02be40357531cc90d4f432b131 @gmarty gmarty committed Oct 29, 2012
Showing with 10 additions and 2 deletions.
  1. +2 −2 lib/natural/inflectors/fr/noun_inflector.js
  2. +8 −0 lib/natural/inflectors/ja/noun_inflector.js
View
4 lib/natural/inflectors/fr/noun_inflector.js
@@ -198,7 +198,7 @@ var NounInflector = function() {
this.addIrregular('putto', 'putti');
this.addIrregular('targui', 'touareg'); // touareg -> touaregs is also OK.
- // Singularize
+ // Pluralize
this.pluralForms.regularForms.push([/^(av|b|c|carnav|cérémoni|chac|corr|emment|emmenth|festiv|fut|gavi|gra|narv|p|récit|rég|rit|rorqu|st)al$/i, '$1als']);
this.pluralForms.regularForms.push([/^(aspir|b|cor|ém|ferm|gemm|soupir|trav|vant|vent|vitr)ail$/i, '$1aux']);
this.pluralForms.regularForms.push([/^(bij|caill|ch|gen|hib|jouj|p|rip|chouch)ou$/i, '$1oux']);
@@ -209,7 +209,7 @@ var NounInflector = function() {
this.pluralForms.regularForms.push([/(s|x)$/i, '$1']);
this.pluralForms.regularForms.push([/(.*)$/i, '$1s']);
- // Pluralize
+ // Singularize
this.singularForms.regularForms.push([/^(aspir|b|cor|ém|ferm|gemm|soupir|trav|vant|vent|vitr)aux$/i, '$1ail']);
this.singularForms.regularForms.push([/^(aloy|b|bouc|boy|burg|conoy|coy|cr|esquim|ét|fabli|flé|flûti|glu|gr|gru|hoy|joy|kérab|matéri|nobli|noy|pré|sen|sén|t|touch|tuss|tuy|v|ypré)aux$/i, '$1au']);
this.singularForms.regularForms.push([/^(bij|caill|ch|gen|hib|jouj|p|rip|chouch)oux$/i, '$1ou']);
View
8 lib/natural/inflectors/ja/noun_inflector.js
@@ -27,8 +27,16 @@
* \@see http://www.excite.co.jp/dictionary/english_japanese/
*
* This script assumes input is normalized using normalizer_ja().
+ * Pluralizing Japanese has a very limited interest.
+ * Japanese don't usually distinct plural from singular, so even a word looking
+ * like a singular might actually be a plural.
+ *
+ * Singularization of nouns ending by -tachi or -ra is achieved using a
+ * comprehensive black list, while nouns ending by -domo or -gata use a white
+ * list because there are too many exceptions.
*
* \@todo Singularize nouns ending by -ら, but there are too many exceptions.
+ * \@todo Expand the list of common plurals ending by -domo and -gata.
*/
var SingularPluralInflector = require('../singular_plural_inflector'),

0 comments on commit 031b64d

Please sign in to comment.