登录 注册
其他
9,970
Stars
1,071
Forks
187
Watchers
18
Open Issues
NOASSERTION
许可证
C#
语言
2012-05-03
创建时间
2026-11-11
最近更新

项目能做什么

.NET 人性化格式工具,满足字符串、枚举、日期时间、数字和数量的展示与处理需求。
来源:基于仓库元数据 · 内容以仓库实际 README 为准

使用说明 查看原始 README 原仓库文档

中文使用说明暂未生成。下面保留原仓库 README 摘录,命令与配置均以原文为准。
原始 README 摘录(英文原文,节选前 3000 字符)
# Humanizer

[![Build Status](https://dev.azure.com/dotnet/Humanizer/_apis/build/status/Humanizer-CI?branchName=main)](https://dev.azure.com/dotnet/Humanizer/_build?definitionId=14)
[![NuGet version](https://img.shields.io/nuget/v/Humanizer.svg?logo=nuget&cacheSeconds=300)](https://www.nuget.org/packages/Humanizer)
[![NuGet downloads](https://img.shields.io/nuget/dt/Humanizer.svg?logo=nuget&cacheSeconds=300)](https://www.nuget.org/packages/Humanizer)

Humanizer is a .NET library for turning strings, enums, dates, times, durations, numbers, quantities, and collections into human-friendly text.

## Install

```console
dotnet add package Humanizer
```

Select your Humanizer version in the [documentation site](https://humanizr.net/docs/) for version-correct package, framework, and API guidance.

## Example

```csharp
using System.Globalization;
using Humanizer;

var culture = CultureInfo.GetCultureInfo("en-US");
var text = TimeSpan.FromMinutes(2).Humanize(culture: culture);
var indianNumber = 1_000_000_000L.ToIndianWords(IndianScaleStyle.CroreBased);
var precise = TimeSpan.FromMilliseconds(1500).HumanizeWithFractionalSeconds(
    precision: 1,
    maxFractionalDigits: 3,
    roundingMode: MidpointRounding.ToEven,
    culture: culture,
    maxUnit: TimeUnit.Second);

Console.WriteLine(text); // 2 minutes
Console.WriteLine(indianNumber); // one hundred crore
Console.WriteLine(precise); // 1.5 seconds

var german = CultureInfo.GetCultureInfo("de-DE");
var duration = TimeSpan.FromDays(7).HumanizeWithCase(
    GrammaticalCase.Dative,
    culture: german);

Console.WriteLine($"in {duration}"); // in einer Woche
```

In v4 previews, applications can provide the exact noun forms for a culture's
CLDR cardinal categories:

```csharp
var files = new PluralizationForms(
    singular: "plik",
    other: "pliku",
    few: "pliki",
    many: "plików");

if (files.TryPluralize(5m, CultureInfo.GetCultureInfo("pl"), out var noun))
    Console.WriteLine(noun); // plików
```

`TryPluralize` uses the required cardinal rule for every supported culture and
returns `false` when the selected form was not supplied. `TrySingularize`
resolves any exact form in the same set. See
[inflection and quantities](https://humanizr.net/docs/scenarios/inflection-and-quantities/)
for examples.

`HumanizeWithCase` returns only the duration phrase; add any required
preposition yourself. Singular forms may include a locale-authored one-word
or article, and a locale may encode a count in the unit form. Locales and custom
components without verified case support throw `NotSupportedException`
instead of falling back to English.

V4 previews also provide opt-in decimal SI and binary IEC byte-size APIs:

```csharp
var size = ByteSize.FromBytes(1_000_000);

Console.WriteLine(size.Format(ByteSizeUnitSystem.DecimalSi)); // 1 MB
Console.WriteLine(size.Format(ByteSizeUnitSystem.BinaryIec)); // 976.56 KiB
```

Legacy byte-size APIs keep their established unit factors. See
[byte sizes and rates](https://
阅读完整原文

项目深度分析 规则生成(AI 未配置)

综合评分 42.9 分。该项目在“个人可实施性”维度得 37 分,“付费可能性”维度得 20.0 分,差异化空间 70.0 分(评分依据见评分卡)。

面向细分需求的二次开发产品

产品构想基于 Humanizer 的核心能力,聚焦一个更窄的场景(如某平台、某行业)做差异化。
目标用户该细分场景用户
难度/周期中 · 2~6 周
收费模式买断制 / 订阅制 / 广告
竞争风险细分需求规模需验证
依据 AI 推测:基于项目主题标签的判断
以上为规则引擎基于仓库公开数据生成的参考结论,包含推测成分,不构成投资或创业承诺;配置 AI 后可获得更深入的分析。
报告会保存到 个人中心

竞品与相似项目 GitHub Search 真实检索

项目中文简介Stars语言
blader/humanizer 中文介绍暂未生成
Agent skill that removes signs of AI-generated writing from
67,684 Python
op7418/Humanizer-zh 中文介绍暂未生成
Humanizer 的汉化版本,Claude Code Skills,旨在消除文本中 AI 生成的痕迹。
22,530 Python
AhmadHassan-BTed/Turnitout-Humanizer 中文介绍暂未生成
FREE FOREVER, NO LIMITS 100% Programmatic, Zero-AI Plagiaris
12,102 HTML
AhmadHassan-BTed/NaSuno-SongHumanizer 中文介绍暂未生成
AI audio watermark removal & forensic anti-attribution toolk
5,968 -
以上为通过 GitHub 官方 Search API 检索的相似项目,功能差异与优劣势需进一步人工确认,配置 AI 后可生成对比分析。

项目优势与风险

技术成熟度创建于 2012-05-03,近 30 天仍在推送,发布过 92 个 Release
社区活跃Star 9,970 / Fork 1,071 / Issue 18(数据支持,可自行核实)
许可证NOASSERTION
主要风险上游项目方向可能变化;同赛道竞争者较多(见竞品表);热度与需求不完全等价

安装与使用

此项目未提供 Docker 镜像,安装步骤以原仓库 README 为准(涉及依赖安装与环境配置,对新手门槛较高)。