Converting Python scripts to APIs
<p>I have a Python script that extracts certain consumer product aspects from customer reviews using LinearSVC, but I am trying to convert this script into some sort of API to use for new reviews. Is there an easy way to do this? I am very new to the whole concept of APIs.</p>

<p>An API is just a library you import once it's reachable by the interpreter in your case. So any import in python is you calling on an library/API.</p>

<p>So if you're script is called <em>foobar.py</em> for example, if it is in the same directory as other python files using</p>

<pre><code>import foobar
</code></pre>

<p>at the top of your python file should allow you to reference any functions made in your original python script.</p>

python api python-textprocessing