code: private void writeObject(ObjectOutputStream out) throws IOException {
          out.defaultWriteObject();
          // If the SemanticSpace that was provided is already serializable, then
          // just write it to the stream as is
          if (sspace instanceof Serializable) {
              out.writeObject(sspace);
          }
          // Otherwise, in order to serialize this instance, wrap the data in a
          // dummy SemanticSpace that contains the equivalent term-vector mapping
          else {
              verbose(LOGGER, "%s is not serializable, so writing a copy " +
                      "of the data", sspace.getSpaceName());
              Map<String,Vector> termToVector = 
                  new HashMap<String,Vector>(sspace.getWords().size());
              for (String term : sspace.getWords()) 
                  termToVector.put(term, sspace.getVector(term));
              SemanticSpace copy = new VectorMapSemanticSpace<Vector>(
                  termToVector, "copy of " + sspace.getSpaceName(),
                  sspace.getVectorLength());
              out.writeObject(copy);
          }
      }
docs: Writes the state of the finder to the stream, handling the case where the
  backing {@code SemanticSpace} is not serializable.