Skip to content
Snippets Groups Projects
Commit 766209e9 authored by Adam Radziszewski's avatar Adam Radziszewski
Browse files

add mask filled with 1's to use for POS masking

parent 33dc14da
No related merge requests found
......@@ -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)
......
......@@ -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.
......
......@@ -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.
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment