Comments (1)
An explicit example:
Python 3.7.0 (default, Jun 29 2018, 20:13:13)
[Clang 9.1.0 (clang-902.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import inflect
>>> p = inflect.engine()
>>> print(p.singular_noun("police"))
polouse
This comes from here:
However, I'm not sure if this is a bug. You're asking for the singular noun of "police", which is neither a plural nor singular noun. It's a collective noun.
So I think this is classed under "junk in, junk out":
Note that all such methods expect the singular form of the word. The results of passing a plural form are undefined (and unlikely to be correct).
https://github.com/jazzband/inflect/blob/master/README.rst#forming-plurals-and-singulars
An exception might be the dialect form known from The Wire/Baltimore, "he's a good police", but:
The module is built around standard British spelling, but is designed to cope with common American variants as well. Slang, jargon, and other English dialects are not explicitly catered for.
from inflect.
Related Issues (20)
- Broken ordinal cases
- Plural form of acronyms HOT 1
- Dependency on `pydantic` requires Rust, which is not available on Cygwin. Pre-compiled wheels might also be not available on non-{windows,linux,mac} platforms HOT 6
- Copyright notice removed HOT 4
- How to force stop some groups in the string HOT 1
- Please add the capability for converting casing HOT 1
- Capitalized words are not inflected HOT 1
- Is there words_to_numbers? HOT 1
- Handle latin plurals HOT 1
- inflect/__init__.py::inflect.engine.compare test fails with pydantic-core >= 2.12 HOT 1
- "Guppy" -> "Guppys" instead of "Guppies" and others HOT 1
- TypeErrors (expected list, got tuple) with python 3.12 HOT 2
- 7.2.0 failing tests HOT 3
- Document that this is for English only HOT 1
- Pyright incompatibility HOT 3
- import time is unacceptably slow HOT 7
- Feature: currency mode HOT 3
- Incorect singular inflections of business, physics, biomechanics
- more-itertools dependency needs to be at least v8.5 HOT 3
- number_to_words, group==2 and 3 digit numbers
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from inflect.