Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9060747
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T15:18:35+00:00 2026-06-16T15:18:35+00:00

I have modified http://fivefilters.org/term-extraction/ this project so that: Given input (https://gist.github.com/4426264) of text the

  • 0

I have modified http://fivefilters.org/term-extraction/ this project so that:

Given input (https://gist.github.com/4426264) of text the python script term-extraction.py outputs keywords in json format and sends via POST the json to a php file
term-extraction.py -> echo.php

link to term-extraction.py https://gist.github.com/4426181
link to echo.php https://gist.github.com/4426193

here is the json output given by the php script: https://gist.github.com/4426197
here is the output of term-extraction.py : http://jsfiddle.net/Bw7UX/

here is the desired array output that I would like to be passed into php: https://gist.github.com/4426208

So, my problem essentially is that:

Array
(
    [json] => None
)

I would like the php array to have the value of all the keywords from the python script, like this link: https://gist.github.com/4426208

array(42) {
  [0]=>
  string(10) "rajaratnam"
  [1]=>
  string(5) "court"
  [2]=>
  string(14) "district court"
...
[41]=>
string(6) "appeal"
}

I think my problem may be with line 69 thru 78 of term-extraction.py and specifically this line:

mydata=[('json',  self.response.out.write(json.dumps(list, indent=0)))] #trying to create an 

Thanks in advance for your replies, I am very new to python so I appreciate the patience.

edit: This is the output when the script is run. I do not get why the json is being output from they python script but it is not in the PHP array properly.
`
START echo.php

NULL

echoing post json:
POST ITEMS:
NO POST ITEMS
Array
(
)
END echo.php

Status: 200 OK Cache-Control: no-cache Content-Type: text/plain Expires: Fri, 01 Jan 1990 00:00:00 GMT Content-Length: 533 { “json”: [ “rajaratnam”, “court”, “district court”, “sec”, “court papers”, “securities fraud”, “court records”, “galleon group”, “exchange commission”, “sakthi prasad”, “u.s”, “case”, “judgment”, “group”, “securities”, “gupta”, “district”, “sakthi”, “right”, “co”, “founder”, “penalties”, “raj”, “consulting”, “days”, “manager”, “conspiracy”, “year”, “years”, “prasad”, “inc”, “network”, “lawsuit”, “editing”, “vs”, “sachs”, “galleon”, “commission”, “reuters”, “papers”, “tips”, “appeal” ] }
`

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T15:18:36+00:00Added an answer on June 16, 2026 at 3:18 pm

    Seems that self.response.out.write function returns None. I think on line 69 you should have:

    mydata = json.dumps({'json': list}, indent=0)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm learning from this tutotrials: http://en.wikibooks.org/wiki/Category:OpenGL_Programming http://www.opengl-tutorial.org/ I have modified the 7.th lesson from
I have modified the multihost.py middleware I found at http://effbot.org/zone/django-multihost.htm to set the settings.SITE_ID
I have a gridview and have modified it following this article: http://msdn.microsoft.com/en-us/library/aa992036.aspx#Y3473 to allow
I am implementing the Zoomable Treemap in D3 (http://bost.ocks.org/mike/treemap/), however I have modified it
I have modified my MOSS 2007 configuration to query a given target AD successfully.
I have modified a working Windows service that had always been starting beforehand. After
Recently I have modified my code to While taking input form STDIN, I moved
I have modified my treeview to look like an Org chart using the example
I have this ASP.NET MVC app that I've deployed on IIS6/Win2003 as a virtual
I have modified this countdown script to countdown to 4:20pm everyday. I have attempted

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.