Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A3 - what is the structure of dicts ? #8

Closed
thirumalrao opened this issue Mar 15, 2017 · 2 comments
Closed

A3 - what is the structure of dicts ? #8

thirumalrao opened this issue Mar 15, 2017 · 2 comments

Comments

@thirumalrao
Copy link

Am a bit confused on the structure of dicts (one of the return parameter in make_feature_dicts())

method defines as - A list of dicts, one per token, containing the features for that token.

If its a list of dict per token, would dicts be a list of list of dicts where each sublist has all feature dicts for a token -
[[{feature1 : 1}, {feature2 : 1}, {feature3 : 1}], [feature1 : 1], {feature3 : 1},{feature4 : 1}] ?

But if we go by test_a3 , dicts seem to be just a list of dict something like
[{feature1 : 1}, {feature2 : 1}, ....]

If this is the case, how do we associate token to features ?

@aronwc
Copy link
Member

aronwc commented Mar 16, 2017

The returned object is a list of dicts. There is one dict per token. Here's a sample output for two tokens, each of which have two features:

[
  {'feature1': 1,
   'feature2': 1
  },

  {'feature1': 1,
   'feature2': 1
  }
]

@thirumalrao
Copy link
Author

Thanks !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants