diff --git a/libcorpus2/CMakeLists.txt b/libcorpus2/CMakeLists.txt index 9d0700052bd15aeca89a6ea792c221b0ed070424..e705ffff817643829c3f583d7f371c1dbfe1cd7c 100644 --- a/libcorpus2/CMakeLists.txt +++ b/libcorpus2/CMakeLists.txt @@ -3,7 +3,7 @@ PROJECT(corpus2) set(corpus2_ver_major "1") set(corpus2_ver_minor "0") -set(corpus2_ver_patch "10") +set(corpus2_ver_patch "11") if(NOT LIBCORPUS2_SRC_DATA_DIR) diff --git a/libcorpus2/tag.h b/libcorpus2/tag.h index 2713071f62976507a6d54b006ac440e776ec200a..9041ca445f03c4506123b8f38af41df289fbc794 100644 --- a/libcorpus2/tag.h +++ b/libcorpus2/tag.h @@ -34,6 +34,8 @@ typedef boost::int8_t idx_t; typedef PwrNlp::bitset<64> mask_t; BOOST_STRONG_TYPEDEF(boost::uint32_t, tagset_idx_t); +const mask_t filled_mask(PwrNlp::filled_bitset<64>()); + /** * This is an extended version of a POS tag, which also includes a number * of attributes which may have values set. diff --git a/libpwrutils/bitset.h b/libpwrutils/bitset.h index a28a75729a318961a0eaaec238b46d5095c5a901..358b71ee112f8237899eb058187b9bf9af632cb3 100644 --- a/libpwrutils/bitset.h +++ b/libpwrutils/bitset.h @@ -37,6 +37,13 @@ static const size_t ulong_bits = sizeof(unsigned long) * CHAR_BIT; typedef bitset<ulong_bits> word_bitset; +template<size_t S> +std::bitset<S> filled_bitset() +{ + std::bitset<S> b = std::bitset<S>(); + b.flip(); + return b; +} /** * Count set bits in a integral type.