hash_grady_pos: Grady Ward's Moby Parts of Speech

Description Usage Arguments Format Details Source Examples

Description

A dataset containing a hash lookup of Grady Ward's parts of speech from the Moby project. The words with non-ASCII characters removed.

grady_pos_feature - A function for augmenting hash_grady_pos with 3 additional columns: (1) n_pos - the number of parts of speech a word has, (2) space - logical; indicating if a word contains a space, & (3) primary - logical; indicating if this is the most likely part of speech given the word.

Usage

1
2
3

Arguments

data

This should be lexicon::hash_grady_pos.

Format

A data frame with 246,691 rows and 3 variables

Details

Source

Originally downloaded from: http://icon.shef.ac.uk/Moby

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
library(data.table)

hash_grady_pos <- grady_pos_feature(hash_grady_pos)
hash_grady_pos['dog']
hash_grady_pos[primary == TRUE, ]
hash_grady_pos[primary == TRUE & space == FALSE, ]

## End(Not run)

Example output

   word                   pos n_pos space primary
1:  dog                  Noun     3 FALSE    TRUE
2:  dog Verb (usu participle)     3 FALSE   FALSE
3:  dog     Verb (transitive)     3 FALSE   FALSE
           word              pos n_pos space primary
     1:     3-d        Adjective     2 FALSE    TRUE
     2:     4-f             Noun     1 FALSE    TRUE
     3:     4-h        Adjective     1 FALSE    TRUE
     4:  4-h'er             Noun     1 FALSE    TRUE
     5:       a Definite Article     4 FALSE    TRUE
    ---                                             
227516: zymosis             Noun     1 FALSE    TRUE
227517:  zyrian             Noun     2 FALSE    TRUE
227518:    zysk             Noun     1 FALSE    TRUE
227519:      zz             Noun     1 FALSE    TRUE
227520:     zzt             Noun     1 FALSE    TRUE
           word              pos n_pos space primary
     1:     3-d        Adjective     2 FALSE    TRUE
     2:     4-f             Noun     1 FALSE    TRUE
     3:     4-h        Adjective     1 FALSE    TRUE
     4:  4-h'er             Noun     1 FALSE    TRUE
     5:       a Definite Article     4 FALSE    TRUE
    ---                                             
191980: zymosis             Noun     1 FALSE    TRUE
191981:  zyrian             Noun     2 FALSE    TRUE
191982:    zysk             Noun     1 FALSE    TRUE
191983:      zz             Noun     1 FALSE    TRUE
191984:     zzt             Noun     1 FALSE    TRUE

lexicon documentation built on May 2, 2019, 1:42 p.m.