question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Representing nested terms

See original GitHub issue

Currently dates are tagged in separate parts ie. 12th November 1981 is tagged this way:

[
	[
		{
			"text": "12th",
			"normal": "12th",
			"tags": {
				"Ordinal": true,
				"Value": true,
				"Date": true,
				"NumericValue": true
			}
		},
		{
			"text": "November",
			"normal": "november",
			"tags": {
				"TitleCase": true,
				"Month": true,
				"Date": true,
				"Singular": true,
				"Noun": true
			}
		},
		{
			"text": "1981",
			"normal": "1981",
			"tags": {
				"NumericValue": true,
				"Value": true,
				"Cardinal": true,
				"Date": true,
				"Year": true
			}
		}
	]
]

So each part of the date is tagged as “Date”. I think it would be better if the tag was changed to “DatePart” and an additional lumped/combined term would be returned for the whole date and tagged as “Date”.

Another related idea would be to have the concept of “LumpTerm”, a “Term” which contains an ordered collection of Terms and no text of its own… This would be useful in instances other than Dates - cantractions, money (ie. $35) and the other lump-terms for example.

What do you think?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
spencermountaincommented, Mar 2, 2017

Right. Maybe it should support that (#Person|#Date)+ should work. But if you dont want combinations of people and dates, you’ll have to make two separate queries and do some kinda diff

0reactions
leosecciacommented, Mar 2, 2017

Sorry this should probably be on a separate issue but it is related 😃 ‘(#Person|#Date)’ works as I would expect while ‘(#Person+|#Date+)’ does not return anything at all.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The mathematical representation of a nested random effect term
Suppose that a dependent level variable y is measured at a unit level (level 1) that is nested within units of type A...
Read more >
Nested Term Graphs - arXiv
We report on work in progress on 'nested term graphs' for formalizing higher-order terms (e.g. finite or infinite λ-terms), including those expressing ...
Read more >
Use nested and repeated fields | BigQuery - Google Cloud
The recommended way to denormalize data in BigQuery is to use nested and repeated ... Nested data is represented as a STRUCT type...
Read more >
How to work with Nested Data - Medium
The different addresses in the array are the recurring data. The different fields within each address are the nested data. First Example. So...
Read more >
Prolog - Using terms to represent and access complex, nested ...
For fun, I cobbled together a pair of rules that generalize arbitrary depth access to structures of the form name([attr_1([attr_1_1,...attr_1_n ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found