private static boolean isConjWithNoPrep(TreeGraphNode node, Collection<TypedDependency> list) {
    for (TypedDependency td : list) {
      if (td.gov() == node && td.reln() == CONJUNCT) {
        // we have a conjunct
        // check the POS of the dependent
        String tdDepPOS = td.dep().parent().value();
        if (!(tdDepPOS.equals("IN") || tdDepPOS.equals("TO"))) {
          return true;
        }
      }
    }
    return false;
  }
private static boolean isConjWithNoPrep ( TreeGraphNode node , Collection < TypedDependency > list ) { for ( TypedDependency td : list ) { if ( td . gov ( ) == node && td . reln ( ) == CONJUNCT ) { String tdDepPOS = td . dep ( ) . parent ( ) . value ( ) ; if ( ! ( tdDepPOS . equals ( "IN" ) || tdDepPOS . equals ( "TO" ) ) ) { return true ; } } } return false ; }
Given a list of typedDependencies, returns true if the node "node" is the
governor of a conj relation with a dependent which is not a preposition

@param node
A node in this GrammaticalStructure
@param list
A list of typedDependencies
@return true If node is the governor of a conj relation in the list with
the dep not being a preposition