This example doesn't work. It returns all five words.
{%assign value = "word word word word word"%}
{{ value | truncatewords: 1 }}
Instead use an underscore "truncate_words". This returns just one word.
{%assign value = "word word word word word"%}
{{ value | truncate_words: 1 }}
If the namingconvention is set to C# than you should use camelcasing "TruncateWords". This returns just one word.
{%assign value = "word word word word word"%}
{{ value | TruncateWords: 1 }}