Method code for $english_lib.get_noun()

[Turn on line numbering]
arg spec, @plural;
var i, vb;

i = "/" in spec + "/";
if (plural && plural[1]) {
    if (i < spec.length())
        vb = spec.subrange(i + 1);
    else
        vb = ._noun_plural(spec);
} else if (i > 1) {
    vb = spec.subrange(1, i - 1);
} else {
    vb = ._noun_singular(spec.subrange(2));
}

// just pass to $string.capitalize()?
if (strcmp("a", i == 1 ? spec[2] : spec) > 0)
    return vb.capitalize();
else
    return vb;

// Created 11-Nov-1996 as a part of ColdCore, see: @help Credit

Tlon