code: private Sentence constructSentence(List<Token> tokens) throws IOException {
          Sentence sentence;
          try {
              sentence = new SimpleSentence(tokens, strict);
          } catch (IllegalArgumentException e) {
              throw new IOException(e.getMessage());
          }
          return sentence;
      }
docs: Construct a sentence. If strictness is used and invariants do not hold, convert
  the exception to an IOException.