In [9]:
import requests
import pandas as pd

In [139]:
r = requests.get('http://api.biblia.com/v1/bible/content/LEB.text?passage=Genesis1:1&style=bibleTextOnly&key=78107f435755fdf76ac5f8d991664d79')

In [140]:
Genesis1 = r.text

In [141]:
Genesis1


Out[141]:
u'In the beginning, God created the heavens and the earth\u2014'

In [142]:
from spacy.en import English
nlp = English()

In [143]:
doc = nlp(Genesis1)

In [145]:
WordsList = []
for idx,token in enumerate(doc):
    wordDict ={}
    wordDict['part_of_speech']=token.pos_
    wordDict['tag']=token.tag_
    wordDict['token']=token
    wordDict['entity_type']=token.ent_type_
    wordDict['dependencies']=token.dep_
    wordDict['lemma']=token.lemma_
    WordsList.append(wordDict)

In [147]:
WordsList[0:]


Out[147]:
[{'dependencies': u'prep',
  'entity_type': u'',
  'lemma': u'in',
  'part_of_speech': u'ADP',
  'tag': u'IN',
  'token': In },
 {'dependencies': u'det',
  'entity_type': u'',
  'lemma': u'the',
  'part_of_speech': u'DET',
  'tag': u'DT',
  'token': the },
 {'dependencies': u'pobj',
  'entity_type': u'',
  'lemma': u'beginning',
  'part_of_speech': u'NOUN',
  'tag': u'NN',
  'token': beginning},
 {'dependencies': u'punct',
  'entity_type': u'',
  'lemma': u',',
  'part_of_speech': u'PUNCT',
  'tag': u',',
  'token': , },
 {'dependencies': u'nsubj',
  'entity_type': u'',
  'lemma': u'god',
  'part_of_speech': u'NOUN',
  'tag': u'NNP',
  'token': God },
 {'dependencies': u'ROOT',
  'entity_type': u'',
  'lemma': u'create',
  'part_of_speech': u'VERB',
  'tag': u'VBD',
  'token': created },
 {'dependencies': u'det',
  'entity_type': u'',
  'lemma': u'the',
  'part_of_speech': u'DET',
  'tag': u'DT',
  'token': the },
 {'dependencies': u'dobj',
  'entity_type': u'',
  'lemma': u'heaven',
  'part_of_speech': u'NOUN',
  'tag': u'NNS',
  'token': heavens },
 {'dependencies': u'cc',
  'entity_type': u'',
  'lemma': u'and',
  'part_of_speech': u'CONJ',
  'tag': u'CC',
  'token': and },
 {'dependencies': u'det',
  'entity_type': u'',
  'lemma': u'the',
  'part_of_speech': u'DET',
  'tag': u'DT',
  'token': the },
 {'dependencies': u'conj',
  'entity_type': u'',
  'lemma': u'earth\u2014',
  'part_of_speech': u'NOUN',
  'tag': u'NN',
  'token': earth—}]

In [ ]: