|
12 | 12 | print(json.dumps(personality_insights.profile( |
13 | 13 | text=personality_text.read()), indent=2)) |
14 | 14 |
|
15 | | -# with open(join(dirname(__file__), |
16 | | -# '../resources/personality.txt') as personality_text: |
| 15 | +# with open(join(dirname(__file__), '../resources/personality.txt')) as \ |
| 16 | +# personality_text: |
17 | 17 | # personality_insights_json = {"contentItems": [ |
18 | 18 | # {"id": "245160944223793152", "userid": "bob", "sourceid": "twitter", |
19 | | -# "created": 1427720427, |
20 | | -# "updated": 1427720427, "contenttype": "text/plain", "charset": "UTF-8", |
21 | | -# "language": "en-us", |
22 | | -# "content": personality_text.read(), "parentid": "", "reply": "false", |
23 | | -# "forward": "false"}]} |
24 | | -# print(json.dumps(personality_insights.profile(text=personality_insights_json), |
25 | | -# indent=2)) |
| 19 | +# "created": 1427720427, "updated": 1427720427, |
| 20 | +# "contenttype": "text/plain", "charset": "UTF-8", |
| 21 | +# "language": "en-us", "content": personality_text.read(), |
| 22 | +# "parentid": "", "reply": "false", "forward": "false"}]} |
| 23 | +# print(json.dumps(personality_insights.profile( |
| 24 | +# text=personality_insights_json), indent=2)) |
26 | 25 | # |
27 | | -# with open(join(dirname(__file__), |
28 | | -# '../resources/personality.es.txt') as personality_text: |
29 | | -# print(json.dumps(personality_insights.profile(text=personality_text.read(), |
30 | | -# language='es'), indent=2)) |
| 26 | +# with open(join(dirname(__file__), '../resources/personality.es.txt')) as \ |
| 27 | +# personality_text: |
| 28 | +# print(json.dumps(personality_insights.profile( |
| 29 | +# text=personality_text.read(), language='es'), indent=2)) |
0 commit comments