Skip to content
Snippets Groups Projects
Select Git revision
  • 3630de8d41e18d27861fcc242b1ab77572726430
  • main default protected
  • ud_training_script
  • fix_seed
  • merged-with-ner
  • multiword_fix_transformer
  • transformer_encoder
  • combo3
  • save_deprel_matrix_to_npz
  • master protected
  • combo-lambo
  • lambo-sent-attributes
  • adding_lambo
  • develop
  • update_allenlp2
  • develop_tmp
  • tokens_truncation
  • LR_test
  • eud_iwpt
  • iob
  • eud_iwpt_shared_task_bert_finetuning
  • 3.3.1
  • list
  • 3.2.1
  • 3.0.3
  • 3.0.1
  • 3.0.0
  • v1.0.6
  • v1.0.5
  • v1.0.4
  • v1.0.3
  • v1.0.2
  • v1.0.1
  • v1.0.0
34 results

example.conllu

Blame
  • position.cpp 709 B
    #include <libwccl/values/position.h>
    #include <libwccl/sentencecontext.h>
    #include <boost/lexical_cast.hpp>
    
    namespace Wccl {
    
    const char* Position::type_name = "Position";
    
    std::string Position::to_raw_string() const
    {
    	switch (val_) {
    	case Nowhere:
    		return "nowhere";
    	case Begin:
    		return "begin";
    	case End:
    		return "end";
    	default:
    		return boost::lexical_cast<std::string>(val_);
    	}
    }
    
    std::string Position::var_repr(const std::string &var_name)
    {
    	std::stringstream ss;
    	ss << "$" << var_name;
    	return ss.str();
    }
    
    bool Position::equals(const Position& other, const SentenceContext& context) const
    {
    	return context.get_abs_position(*this) == context.get_abs_position(other);
    }
    
    } /* end ns Wccl */