Linked Art in C#

Profile advisor

Paste a column of dates from a collection and the advisor says which conventions the data uses, before anything is parsed. Each string is still parsed on its own; the advisor only recommends the profile to parse it under, and writes that profile out for you to review and save. Nothing you paste is stored.

Up to 20,000 lines; strings over 500 characters are skipped.

Or try a corpus sample: yearrange (museum catalogues) timetwister (US archives) Getty ULAN (artist dates) EDTF specification examples PMC (Paul Mellon Centre) outputs

PMC (Paul Mellon Centre) outputs 91 analysed · via the service

Recommendations

Suggested profile

Nothing in the data called for a change from the default profile.

{
  "inherits": "default",
  "name": "suggested",
  "description": "Suggested by the profile advisor from 91 strings: nothing differed from the default. Review before use."
}

Vocabulary

KindWord or notationStringsFor example
Hedgesc12 c2005 c1985 c2010
Century notations1800s1 [1950s-2000s]

Shapes

ShapeStringsFor exampleWhy it matters
Numeric dates0Day, month and year as numbers.
Day-first evidence0A first number over 12, so it can only be a day.
Month-first evidence0A second number over 12, so the first is the month.
Two-digit years0Need a window to become four-digit years.
Bracketed14 [1997] [1988] [1984] Inferred dates in MARC style.
Seasons0Need a hemisphere and a winter policy.
Undated0The text says there is no date.
Open ends0Before, after, present, a trailing dash.
Decades3 [c 1960s-c 1970s] [c 1940s-1953] [1950s-2000s] 1950s and the like; band words apply to them too.
Period words0Dynasties, reigns and named periods need period tables.

The same advice from code

The advisor is a library call and an endpoint on the dates API; the response carries these counts, the examples, the recommendations, the suggested profile and a Markdown rendering.

POST https://dates.linkedart.net/v1/advise
Content-Type: text/plain

early 19th century
ca. 1850
7/4/1776
var report = ProfileAdvisor.Analyse(File.ReadLines("dates.txt"));
Console.WriteLine(report.ToMarkdown());
File.WriteAllText("profiles/mine.json", report.SuggestedProfileJson("mine").ToJsonString(ParseProfile.JsonOptions));

Or from the repository: dotnet run --project tools/Corpus -- advise dates.txt.