ErwinKomen / FoliaEntity

2 stars 1 forks source link

Sometimes empty output is produced #4

Closed ErwinKomen closed 7 years ago

ErwinKomen commented 7 years ago

MvG: Af en toe zie ik trouwens nog wel wat rare lege output als: <alignment format="application/json" class="NEL" xlink:href="" xlink:type="simple" src="spotlight" />

of zelfs: <alignment format="application/json" class="NEL" xlink:href="" xlink:type="simple" src="" />

Terwijl andere spotlight dingen het wel gewoon doen. Misschien een bug nog ergens?

ErwinKomen commented 7 years ago

I've added an additional safeguard at two places:

https://github.com/ErwinKomen/FoliaEntity/blob/master/FoliaEntity/feConv.cs#L434 https://github.com/ErwinKomen/FoliaEntity/blob/master/FoliaEntity/feConv.cs#L560

The program checks whether the service is not empty, and only then proceeds to process the link.

proycon commented 6 years ago

Hmm, I still see this in my output..

<alignment format="application/json" class="NEL" xlink:href="" xlink:type="simple" src="spotlight" />

I wonder if I'm up to date enough, but my binary is identical to /vol/tensusers/ekomen/entity/bin/FoliaEntity.exe. (FoliaEntity itself reports no version information unfortunately)

ErwinKomen commented 6 years ago

I see your point. What is produced contains empty xlink:href attributes. If you look at the log files that can be produced (I think it's the -g option), then it's clear what happens: all named-entities that are not found are processed anyway. (Okay, we don't need a log file for that ... )

Okay, I've added the following to feConv.cs, line 434: && lnkThis.uri != ""

And now it works fine.

ErwinKomen commented 6 years ago

Added -v option to get the version