Hierarchical syntactic models for human activity recognition through mobility traces