diff --git a/libcorpus2/tagset.cpp b/libcorpus2/tagset.cpp index a4afb93feb7261679db1740486ebf851b0f2bf58..77b2260494214d2cc354818e3c56cb791bca3b7e 100644 --- a/libcorpus2/tagset.cpp +++ b/libcorpus2/tagset.cpp @@ -491,19 +491,6 @@ const std::string& Tagset::get_value_name(mask_t v) const } } -idx_t Tagset::get_value_attribute_index(mask_t v) const -{ - std::map<mask_t, idx_t>::const_iterator ci; - ci = value_mask_to_attribute_index_.find(v); - if (ci == value_mask_to_attribute_index_.end()) { - return -1; - } else { - return ci->second; - } -} - - - idx_t Tagset::get_value_attribute(mask_t v) const { std::map<mask_t, idx_t>::const_iterator ci; diff --git a/libcorpus2/tagset.h b/libcorpus2/tagset.h index 51bed03d933966c3f6c7d561bdda248d9c956844..b2d4dcf58363ac90b2738bfc6f460074d04f3651 100644 --- a/libcorpus2/tagset.h +++ b/libcorpus2/tagset.h @@ -319,10 +319,6 @@ public: /// @returns empty string on invalid mask const std::string& get_value_name(mask_t v) const; - /// Value mask -> attribute index - /// @returns -1 on invalid mask - idx_t get_value_attribute_index(mask_t v) const; - /// Getter for the pos -> valid attributes (in order) mapping /// Valid attributes are both the required and optional attributes. diff --git a/tagset-tool/main.cpp b/tagset-tool/main.cpp index a9640ed4164bab0fc0c7f629d2c3603719389f1a..4ae2cdb3b7841d323c605ce4a3e8607646ab2bb9 100644 --- a/tagset-tool/main.cpp +++ b/tagset-tool/main.cpp @@ -129,7 +129,7 @@ void tagset_query_cb(const Corpus2::Tagset& tagset, const std::string& s, } std::cout << "\n"; } else if (val.any()) { - Corpus2::idx_t a = tagset.get_value_attribute_index(val); + Corpus2::idx_t a = tagset.get_value_attribute(val); if (internals) { std::cout << val << " (" << PwrNlp::lowest_bit(val) << ")\n"; std::cout << tagset.get_attribute_mask(a) << " (" << (int)a << ")\n";