cogcomp-nlp icon indicating copy to clipboard operation
cogcomp-nlp copied to clipboard

Why two ViewNames in json files?

Open danyaljj opened this issue 8 years ago • 3 comments

Why there are two "ViewName"s in jsons? Seems redundant ...

screen shot 2017-10-30 at 7 51 01 pm

danyaljj avatar Oct 30 '17 23:10 danyaljj

The first (outer level) viewName is generated from here. https://github.com/CogComp/cogcomp-nlp/blob/4f12708d08acf743dd17a2973f6b1a9fb05b2bd3/core-utilities/src/main/java/edu/illinois/cs/cogcomp/core/utilities/JsonSerializer.java#L437-L448

The second viewName is generated here. https://github.com/CogComp/cogcomp-nlp/blob/4f12708d08acf743dd17a2973f6b1a9fb05b2bd3/core-utilities/src/main/java/edu/illinois/cs/cogcomp/core/utilities/JsonSerializer.java#L62-L65

I think we should remove the second viewName? Because the readView function only uses the first viewName.

schen149 avatar Apr 22 '18 23:04 schen149

If we change it, will it be backward compatible? (i.e. will we be able to read jsons serialized previously?)

danyaljj avatar Apr 22 '18 23:04 danyaljj

should be OK: amended json deserializer would simply ignore the additional value. Note that this json redundancy directly reflects a redundancy in the TextAnnotation/View data structures.

mssammon avatar Jun 11 '18 22:06 mssammon