org.allenai.nlpstack.parse.poly.polyparser
Boilerplate code to serialize a NeighborhoodExtractor to JSON using Spray.
Boilerplate code to serialize a NeighborhoodExtractor to JSON using Spray.
NOTE: If a subclass has a field named type
, this will fail to serialize.
NOTE: IF YOU INHERIT FROM NeighborhoodExtractor, THEN YOU MUST MODIFY THESE SUBROUTINES IN ORDER TO CORRECTLY EMPLOY JSON SERIALIZATION FOR YOUR NEW SUBCLASS.
Load a parser from a file.
Load a parser from a file.
the file contains the serialized parser
the initialized parser
Save a parser to a file.
Save a parser to a file.
This will automatically append ".poly.json" to the specified prefix.
the parser to save
the file to save the configuration to