{"id":943248,"date":"2024-12-26T22:33:35","date_gmt":"2024-12-26T14:33:35","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/943248.html"},"modified":"2024-12-26T22:33:37","modified_gmt":"2024-12-26T14:33:37","slug":"python%e5%a6%82%e4%bd%95%e6%89%93%e5%9c%b0%e5%90%8d","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/943248.html","title":{"rendered":"python\u5982\u4f55\u6253\u5730\u540d"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25080730\/9c243220-0236-4b5c-ac67-42a142e253d2.webp\" alt=\"python\u5982\u4f55\u6253\u5730\u540d\" \/><\/p>\n<p><p> <strong>Python\u4e2d\u6253\u5730\u540d\u7684\u65b9\u6cd5\u5305\u62ec\uff1a\u4f7f\u7528NLP\u5de5\u5177\u3001\u8c03\u7528\u5730\u7406\u6570\u636eAPI\u3001\u5229\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u3002<\/strong>\u5728\u8fd9\u4e9b\u65b9\u6cd5\u4e2d\uff0c\u4f7f\u7528NLP\u5de5\u5177\u8fdb\u884c\u6587\u672c\u5904\u7406\u662f\u6700\u4e3a\u6709\u6548\u7684\u65b9\u5f0f\u3002\u901a\u8fc7\u81ea\u7136\u8bed\u8a00\u5904\u7406\uff08NLP\uff09\u5de5\u5177\uff0c\u5982spaCy\u3001NLTK\u7b49\uff0c\u53ef\u4ee5\u8bc6\u522b\u5e76\u63d0\u53d6\u6587\u672c\u4e2d\u7684\u5730\u540d\u4fe1\u606f\u3002\u63a5\u4e0b\u6765\uff0c\u6211\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u5229\u7528NLP\u5de5\u5177\u5728Python\u4e2d\u8bc6\u522b\u548c\u63d0\u53d6\u5730\u540d\u3002<\/p>\n<\/p>\n<p><p>\u4f7f\u7528NLP\u5de5\u5177\u8fdb\u884c\u5730\u540d\u8bc6\u522b\u662f\u4e00\u4e2a\u6709\u6548\u7684\u65b9\u6cd5\uff0c\u56e0\u4e3a\u8fd9\u4e9b\u5de5\u5177\u53ef\u4ee5\u5904\u7406\u5927\u91cf\u7684\u81ea\u7136\u8bed\u8a00\u6587\u672c\uff0c\u5e76\u8bc6\u522b\u51fa\u5176\u4e2d\u7684\u547d\u540d\u5b9e\u4f53\uff0c\u5305\u62ec\u5730\u540d\u3002\u4ee5spaCy\u4e3a\u4f8b\uff0c\u5b83\u662f\u4e00\u4e2a\u5f3a\u5927\u7684\u81ea\u7136\u8bed\u8a00\u5904\u7406\u5e93\uff0c\u63d0\u4f9b\u4e86\u547d\u540d\u5b9e\u4f53\u8bc6\u522b\uff08NER\uff09\u529f\u80fd\uff0c\u53ef\u4ee5\u7528\u4e8e\u4ece\u6587\u672c\u4e2d\u63d0\u53d6\u5730\u540d\u3002\u4f7f\u7528spaCy\u8fdb\u884c\u5730\u540d\u8bc6\u522b\u7684\u6b65\u9aa4\u5305\u62ec\uff1a\u52a0\u8f7d\u8bed\u8a00\u6a21\u578b\u3001\u5904\u7406\u6587\u672c\u4ee5\u751f\u6210\u6587\u6863\u5bf9\u8c61\u3001\u63d0\u53d6\u6587\u6863\u5bf9\u8c61\u4e2d\u7684\u547d\u540d\u5b9e\u4f53\uff0c\u5e76\u7b5b\u9009\u51fa\u5730\u540d\u5b9e\u4f53\u3002<\/p>\n<\/p>\n<hr>\n<h2><strong>\u4e00\u3001NLP\u5de5\u5177\u7684\u4f7f\u7528<\/strong><\/h2>\n<p><h2>1. \u4f7f\u7528spaCy\u8fdb\u884c\u5730\u540d\u8bc6\u522b<\/h2>\n<\/p>\n<p><p>spaCy\u662f\u4e00\u4e2a\u975e\u5e38\u6d41\u884c\u7684NLP\u5e93\uff0c\u5e7f\u6cdb\u7528\u4e8e\u6587\u672c\u5904\u7406\u548c\u5206\u6790\u3002\u5b83\u63d0\u4f9b\u4e86\u547d\u540d\u5b9e\u4f53\u8bc6\u522b\u529f\u80fd\uff0c\u53ef\u4ee5\u7528\u4e8e\u8bc6\u522b\u6587\u672c\u4e2d\u7684\u5730\u540d\u3002<\/p>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u9700\u8981\u5b89\u88c5spaCy\u5e93\u548c\u8bed\u8a00\u6a21\u578b\u3002\u4f60\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install spacy<\/p>\n<p>python -m spacy download en_core_web_sm<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u4ee3\u7801\u6765\u8bc6\u522b\u6587\u672c\u4e2d\u7684\u5730\u540d\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import spacy<\/p>\n<h2><strong>\u52a0\u8f7d\u8bed\u8a00\u6a21\u578b<\/strong><\/h2>\n<p>nlp = spacy.load(&#39;en_core_web_sm&#39;)<\/p>\n<h2><strong>\u5904\u7406\u6587\u672c<\/strong><\/h2>\n<p>text = &quot;I visited New York and Los Angeles last summer.&quot;<\/p>\n<p>doc = nlp(text)<\/p>\n<h2><strong>\u63d0\u53d6\u5730\u540d<\/strong><\/h2>\n<p>places = [ent.text for ent in doc.ents if ent.label_ == &#39;GPE&#39;]<\/p>\n<p>print(places)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u6bb5\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u9996\u5148\u52a0\u8f7d\u4e86\u82f1\u8bed\u8bed\u8a00\u6a21\u578b<code>en_core_web_sm<\/code>\uff0c\u7136\u540e\u5bf9\u6587\u672c\u8fdb\u884c\u5904\u7406\uff0c\u63d0\u53d6\u51fa\u547d\u540d\u5b9e\u4f53\u7c7b\u578b\u4e3a<code>GPE<\/code>\uff08\u5730\u7406\u653f\u6cbb\u5b9e\u4f53\uff09\u7684\u5730\u540d\u3002<\/p>\n<\/p>\n<p><h2>2. \u4f7f\u7528NLTK\u8fdb\u884c\u5730\u540d\u8bc6\u522b<\/h2>\n<\/p>\n<p><p>NLTK\u662f\u53e6\u4e00\u4e2a\u6d41\u884c\u7684NLP\u5e93\uff0c\u4e5f\u53ef\u4ee5\u7528\u4e8e\u5730\u540d\u8bc6\u522b\u3002\u867d\u7136NLTK\u7684NER\u529f\u80fd\u4e0d\u5982spaCy\u5f3a\u5927\uff0c\u4f46\u5b83\u4ecd\u7136\u53ef\u4ee5\u7528\u4e8e\u4e00\u4e9b\u57fa\u672c\u7684\u5730\u540d\u63d0\u53d6\u4efb\u52a1\u3002<\/p>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u9700\u8981\u5b89\u88c5NLTK\u5e93\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install nltk<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u7136\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u4ee3\u7801\u8fdb\u884c\u5730\u540d\u8bc6\u522b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import nltk<\/p>\n<p>from nltk import ne_chunk, pos_tag, word_tokenize<\/p>\n<p>from nltk.tree import Tree<\/p>\n<h2><strong>\u4e0b\u8f7d\u5fc5\u8981\u7684NLTK\u6570\u636e\u5305<\/strong><\/h2>\n<p>nltk.download(&#39;punkt&#39;)<\/p>\n<p>nltk.download(&#39;averaged_perceptron_tagger&#39;)<\/p>\n<p>nltk.download(&#39;maxent_ne_chunker&#39;)<\/p>\n<p>nltk.download(&#39;words&#39;)<\/p>\n<h2><strong>\u5b9a\u4e49\u51fd\u6570\u63d0\u53d6\u5730\u540d<\/strong><\/h2>\n<p>def get_place_names(text):<\/p>\n<p>    chunked = ne_chunk(pos_tag(word_tokenize(text)))<\/p>\n<p>    place_names = []<\/p>\n<p>    for chunk in chunked:<\/p>\n<p>        if isinstance(chunk, Tree):<\/p>\n<p>            if chunk.label() == &#39;GPE&#39;:<\/p>\n<p>                place_names.append(&#39; &#39;.join(c[0] for c in chunk))<\/p>\n<p>    return place_names<\/p>\n<h2><strong>\u5904\u7406\u6587\u672c<\/strong><\/h2>\n<p>text = &quot;I visited New York and Los Angeles last summer.&quot;<\/p>\n<p>places = get_place_names(text)<\/p>\n<p>print(places)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u6bb5\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528NLTK\u7684<code>ne_chunk<\/code>\u51fd\u6570\u8fdb\u884c\u547d\u540d\u5b9e\u4f53\u8bc6\u522b\uff0c\u5e76\u63d0\u53d6\u51fa\u7c7b\u578b\u4e3a<code>GPE<\/code>\u7684\u5730\u540d\u3002<\/p>\n<\/p>\n<hr>\n<h2><strong>\u4e8c\u3001\u8c03\u7528\u5730\u7406\u6570\u636eAPI<\/strong><\/h2>\n<p><h2>1. \u4f7f\u7528Google Maps API\u8fdb\u884c\u5730\u540d\u8bc6\u522b<\/h2>\n<\/p>\n<p><p>Google Maps API\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u5730\u7406\u6570\u636e\u8bbf\u95ee\u529f\u80fd\uff0c\u53ef\u4ee5\u7528\u4e8e\u5730\u540d\u8bc6\u522b\u548c\u5730\u7406\u4f4d\u7f6e\u67e5\u8be2\u3002<\/p>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u9700\u8981\u5728Google Cloud Platform\u4e0a\u542f\u7528Google Maps API\uff0c\u5e76\u83b7\u53d6API\u5bc6\u94a5\u3002\u7136\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u4ee3\u7801\u8fdb\u884c\u5730\u540d\u8bc6\u522b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import requests<\/p>\n<p>def get_location_info(place_name, api_key):<\/p>\n<p>    url = f&quot;https:\/\/maps.googleapis.com\/maps\/api\/geocode\/json?address={place_name}&amp;key={api_key}&quot;<\/p>\n<p>    response = requests.get(url)<\/p>\n<p>    return response.json()<\/p>\n<h2><strong>\u4f7f\u7528API\u83b7\u53d6\u5730\u540d\u4fe1\u606f<\/strong><\/h2>\n<p>api_key = &#39;YOUR_API_KEY&#39;  # \u66ff\u6362\u4e3a\u4f60\u7684API\u5bc6\u94a5<\/p>\n<p>place_name = &quot;New York&quot;<\/p>\n<p>location_info = get_location_info(place_name, api_key)<\/p>\n<p>print(location_info)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u6bb5\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u901a\u8fc7Google Maps Geocoding API\u67e5\u8be2\u5730\u540d\u4fe1\u606f\u3002\u8fd4\u56de\u7684\u7ed3\u679c\u4e2d\u5305\u542b\u4e86\u5730\u540d\u7684\u8be6\u7ec6\u4fe1\u606f\u548c\u5730\u7406\u5750\u6807\u3002<\/p>\n<\/p>\n<p><h2>2. \u4f7f\u7528OpenStreetMap Nominatim API<\/h2>\n<\/p>\n<p><p>OpenStreetMap\u63d0\u4f9b\u4e86\u514d\u8d39\u7684\u5730\u7406\u6570\u636eAPI\uff0cNominatim\u662f\u5176\u4e2d\u7684\u4e00\u4e2a\u5730\u7406\u7f16\u7801\u670d\u52a1\u3002<\/p>\n<\/p>\n<p><p>\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u4ee3\u7801\u67e5\u8be2\u5730\u540d\u4fe1\u606f\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import requests<\/p>\n<p>def get_location_info_osm(place_name):<\/p>\n<p>    url = f&quot;https:\/\/nominatim.openstreetmap.org\/search?q={place_name}&amp;format=json&amp;limit=1&quot;<\/p>\n<p>    response = requests.get(url, headers={&#39;User-Agent&#39;: &#39;Mozilla\/5.0&#39;})<\/p>\n<p>    return response.json()<\/p>\n<h2><strong>\u4f7f\u7528API\u83b7\u53d6\u5730\u540d\u4fe1\u606f<\/strong><\/h2>\n<p>place_name = &quot;New York&quot;<\/p>\n<p>location_info = get_location_info_osm(place_name)<\/p>\n<p>print(location_info)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u6bb5\u4ee3\u7801\u901a\u8fc7OpenStreetMap Nominatim API\u67e5\u8be2\u5730\u540d\u4fe1\u606f\uff0c\u5e76\u8fd4\u56deJSON\u683c\u5f0f\u7684\u7ed3\u679c\u3002<\/p>\n<\/p>\n<hr>\n<h2><strong>\u4e09\u3001\u6b63\u5219\u8868\u8fbe\u5f0f\u7684\u4f7f\u7528<\/strong><\/h2>\n<p><h2>1. \u6b63\u5219\u8868\u8fbe\u5f0f\u57fa\u7840<\/h2>\n<\/p>\n<p><p>\u6b63\u5219\u8868\u8fbe\u5f0f\u662f\u4e00\u4e2a\u5f3a\u5927\u7684\u5de5\u5177\uff0c\u53ef\u4ee5\u7528\u4e8e\u6a21\u5f0f\u5339\u914d\u548c\u6587\u672c\u63d0\u53d6\u3002\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>re<\/code>\u6a21\u5757\u8fdb\u884c\u6b63\u5219\u8868\u8fbe\u5f0f\u64cd\u4f5c\u3002<\/p>\n<\/p>\n<p><h2>2. \u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u63d0\u53d6\u5730\u540d<\/h2>\n<\/p>\n<p><p>\u5047\u8bbe\u6211\u4eec\u6709\u4e00\u4e2a\u6587\u672c\u6587\u4ef6\uff0c\u5305\u542b\u4e86\u4e00\u4e9b\u5df2\u77e5\u683c\u5f0f\u7684\u5730\u540d\u4fe1\u606f\uff0c\u53ef\u4ee5\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u8fdb\u884c\u63d0\u53d6\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import re<\/p>\n<p>text = &quot;I visited New York, Los Angeles, and San Francisco last summer.&quot;<\/p>\n<h2><strong>\u5b9a\u4e49\u6b63\u5219\u8868\u8fbe\u5f0f\u6a21\u5f0f<\/strong><\/h2>\n<p>pattern = r&quot;\\b(New York|Los Angeles|San Francisco)\\b&quot;<\/p>\n<h2><strong>\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u63d0\u53d6\u5730\u540d<\/strong><\/h2>\n<p>places = re.findall(pattern, text)<\/p>\n<p>print(places)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u6bb5\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u5b9a\u4e49\u4e86\u4e00\u4e2a\u6b63\u5219\u8868\u8fbe\u5f0f\u6a21\u5f0f\uff0c\u7528\u4e8e\u5339\u914d\u6587\u672c\u4e2d\u7684\u5730\u540d\u3002<code>re.findall<\/code>\u51fd\u6570\u8fd4\u56de\u6240\u6709\u5339\u914d\u7684\u7ed3\u679c\u3002<\/p>\n<\/p>\n<p><h2>3. \u52a8\u6001\u6784\u5efa\u6b63\u5219\u8868\u8fbe\u5f0f<\/h2>\n<\/p>\n<p><p>\u5982\u679c\u6709\u4e00\u4e2a\u5730\u540d\u5217\u8868\uff0c\u53ef\u4ee5\u52a8\u6001\u6784\u5efa\u6b63\u5219\u8868\u8fbe\u5f0f\u4ee5\u5339\u914d\u6587\u672c\u4e2d\u7684\u5730\u540d\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import re<\/p>\n<p>text = &quot;I visited New York, Los Angeles, and San Francisco last summer.&quot;<\/p>\n<p>known_places = [&quot;New York&quot;, &quot;Los Angeles&quot;, &quot;San Francisco&quot;]<\/p>\n<h2><strong>\u52a8\u6001\u6784\u5efa\u6b63\u5219\u8868\u8fbe\u5f0f\u6a21\u5f0f<\/strong><\/h2>\n<p>pattern = r&quot;\\b(&quot; + &quot;|&quot;.join(map(re.escape, known_places)) + r&quot;)\\b&quot;<\/p>\n<h2><strong>\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u63d0\u53d6\u5730\u540d<\/strong><\/h2>\n<p>places = re.findall(pattern, text)<\/p>\n<p>print(places)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u6bb5\u4ee3\u7801\u5c55\u793a\u4e86\u5982\u4f55\u4f7f\u7528\u5df2\u77e5\u5730\u540d\u5217\u8868\u52a8\u6001\u6784\u5efa\u6b63\u5219\u8868\u8fbe\u5f0f\uff0c\u5e76\u4ece\u6587\u672c\u4e2d\u63d0\u53d6\u5730\u540d\u3002<\/p>\n<\/p>\n<hr>\n<p><p>\u603b\u7ed3\u6765\u8bf4\uff0cPython\u4e2d\u8bc6\u522b\u548c\u63d0\u53d6\u5730\u540d\u7684\u65b9\u6cd5\u591a\u79cd\u591a\u6837\uff0c\u5305\u62ec\u4f7f\u7528NLP\u5de5\u5177\uff08\u5982spaCy\u548cNLTK\uff09\u3001\u8c03\u7528\u5730\u7406\u6570\u636eAPI\uff08\u5982Google Maps\u548cOpenStreetMap Nominatim\uff09\u4ee5\u53ca\u5229\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u8fdb\u884c\u6587\u672c\u5339\u914d\u3002\u6bcf\u79cd\u65b9\u6cd5\u90fd\u6709\u5176\u72ec\u7279\u7684\u4f18\u70b9\uff0c\u9009\u62e9\u9002\u5408\u7684\u5de5\u5177\u548c\u65b9\u6cd5\u53ef\u4ee5\u6709\u6548\u63d0\u5347\u5730\u540d\u8bc6\u522b\u7684\u51c6\u786e\u6027\u548c\u6548\u7387\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u4f7f\u7528Python\u5904\u7406\u5730\u540d\u6570\u636e\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u591a\u4e2a\u5e93\u6765\u5904\u7406\u5730\u540d\u6570\u636e\u3002\u4f8b\u5982\uff0c<code>geopy<\/code>\u5e93\u53ef\u4ee5\u5e2e\u52a9\u4f60\u8fdb\u884c\u5730\u7406\u7f16\u7801\uff0c\u5c06\u5730\u540d\u8f6c\u6362\u4e3a\u7ecf\u7eac\u5ea6\u5750\u6807\u3002\u4f7f\u7528<code>geopy<\/code>\u65f6\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7\u7b80\u5355\u7684API\u8c03\u7528\u83b7\u53d6\u5730\u540d\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u6bd4\u5982\u56fd\u5bb6\u3001\u57ce\u5e02\u548c\u8857\u9053\u7b49\u3002<\/p>\n<p><strong>\u5728Python\u4e2d\u5982\u4f55\u83b7\u53d6\u5730\u540d\u7684\u7ecf\u7eac\u5ea6\uff1f<\/strong><br \/>\u8981\u83b7\u53d6\u5730\u540d\u7684\u7ecf\u7eac\u5ea6\uff0c\u9996\u5148\u9700\u8981\u5b89\u88c5<code>geopy<\/code>\u5e93\u3002\u4f7f\u7528<code>Nominatim<\/code>\u4f5c\u4e3a\u5730\u7406\u7f16\u7801\u5668\uff0c\u8f93\u5165\u5730\u540d\u540e\uff0c\u8c03\u7528\u76f8\u5e94\u7684\u65b9\u6cd5\u5373\u53ef\u8fd4\u56de\u5176\u7ecf\u7eac\u5ea6\u3002\u4f8b\u5982\uff0c\u901a\u8fc7<code>geolocator.geocode(&quot;\u5730\u540d&quot;)<\/code>\uff0c\u4f60\u53ef\u4ee5\u8f7b\u677e\u83b7\u53d6\u8be5\u5730\u70b9\u7684\u5750\u6807\u3002<\/p>\n<p><strong>\u6709\u6ca1\u6709\u63a8\u8350\u7684Python\u5e93\u53ef\u4ee5\u8fdb\u884c\u5730\u540d\u89e3\u6790\u548c\u5904\u7406\uff1f<\/strong><br \/>\u786e\u5b9e\u6709\u5f88\u591a\u4f18\u79c0\u7684Python\u5e93\u53ef\u4f9b\u9009\u62e9\u3002\u9664\u4e86<code>geopy<\/code>\uff0c<code>geopandas<\/code>\u4e5f\u975e\u5e38\u53d7\u6b22\u8fce\uff0c\u5b83\u53ef\u4ee5\u5904\u7406\u5730\u7406\u6570\u636e\u7684\u53ef\u89c6\u5316\u548c\u5206\u6790\u3002<code>pandas<\/code>\u5e93\u7ed3\u5408<code>geopandas<\/code>\u4f7f\u7528\uff0c\u80fd\u6709\u6548\u7ba1\u7406\u548c\u5206\u6790\u5730\u540d\u76f8\u5173\u6570\u636e\uff0c\u9002\u5408\u9700\u8981\u8fdb\u884c\u590d\u6742\u5730\u7406\u5206\u6790\u7684\u7528\u6237\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u4e2d\u6253\u5730\u540d\u7684\u65b9\u6cd5\u5305\u62ec\uff1a\u4f7f\u7528NLP\u5de5\u5177\u3001\u8c03\u7528\u5730\u7406\u6570\u636eAPI\u3001\u5229\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u3002\u5728\u8fd9\u4e9b\u65b9\u6cd5\u4e2d\uff0c\u4f7f\u7528NLP\u5de5 [&hellip;]","protected":false},"author":3,"featured_media":943254,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/943248"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=943248"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/943248\/revisions"}],"predecessor-version":[{"id":943255,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/943248\/revisions\/943255"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/943254"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=943248"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=943248"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=943248"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}