/* read_model.cpp
 *
 * Originally borrowed from Dan's implementation of Collins' Model 1. 
 *
 * $Id: read_model.cpp,v 1.2 2007/06/05 20:20:52 post Exp $
 */

#include "hash.h"

ostream& operator<< (ostream& ostr, const hs_c1& s) {
  return ostr << nts_name[s.p] << ' ' << nts_name[s.h] << ' ' << 
    s.hhw << ' ' << 
    nts_name[s.hht] << ' ' << (int)s.left << ' ' << (int)s.adj << ' ' << (int)s.verb;
}
ostream& operator<< (ostream& ostr, const hs_c2& s) {
  return ostr << nts_name[s.p] << ' ' << nts_name[s.h] << ' ' << 
    nts_name[s.hht] << ' ' << (int)s.left << ' ' << (int)s.adj << ' ' << (int)s.verb;
}
ostream& operator<< (ostream& ostr, const hs_c3& s) {
  return ostr << nts_name[s.p] << ' ' << nts_name[s.h] << ' ' << 
    (int)s.left << ' ' << (int)s.adj << ' ' << (int)s.verb;
}
ostream& operator<< (ostream& ostr, const hs_c& s) {
  return ostr << nts_name[s.c] << ' ' << nts_name[s.cht] << ' ' << 
    (int)s.punc << ' ' << (int)s.conj;
}


ostream& operator<< (ostream& ostr, const hs_cw1& s) {
  return ostr << nts_name[s.p] << ' ' << nts_name[s.h] << ' ' << 
    s.hhw << ' ' << 
    nts_name[s.hht] << ' ' << (int)s.left << ' ' << (int)s.adj << ' ' << (int)s.verb << ' ' <<
    nts_name[s.c] << ' ' << nts_name[s.cht] << ' ' << (int)s.punc << ' ' << (int)s.conj;
}
ostream& operator<< (ostream& ostr, const hs_cw2& s) {
  return ostr << nts_name[s.p] << ' ' << nts_name[s.h] << ' ' << 
    nts_name[s.hht] << ' ' << (int)s.left << ' ' << (int)s.adj << ' ' << (int)s.verb << ' ' <<
    nts_name[s.c] << ' ' << nts_name[s.cht] << ' ' << (int)s.punc << ' ' << (int)s.conj;
}
ostream& operator<< (ostream& ostr, const hs_cw3& s) {
  return ostr << nts_name[s.cht];
}
ostream& operator<< (ostream& ostr, const hs_cw& s) {
  return ostr << s.chw;
}


ostream& operator<< (ostream& ostr, const hs_h1& s) {
  return ostr << nts_name[s.p] << ' ' <<
    s.hhw << ' ' << 
    nts_name[s.hht];
}
ostream& operator<< (ostream& ostr, const hs_h2& s) {
  return ostr << nts_name[s.p] << ' ' << 
    nts_name[s.hht];
}
ostream& operator<< (ostream& ostr, const hs_h3& s) {
  return ostr << ' ' << nts_name[s.p];
}
ostream& operator<< (ostream& ostr, const hs_h& s) {
  return ostr << nts_name[s.h];
}

ostream& operator<< (ostream& ostr, const hs_pp1& s) {
  return ostr << s.hhw << ' ' <<
    nts_name[s.hht];
}
ostream& operator<< (ostream& ostr, const hs_pp2& s) {
  return ostr << nts_name[s.hht];
}
ostream& operator<< (ostream& ostr, const hs_pp& s) {
  return ostr << nts_name[s.p];
}
