{"id":973572,"date":"2024-12-27T05:58:03","date_gmt":"2024-12-26T21:58:03","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/973572.html"},"modified":"2024-12-27T05:58:05","modified_gmt":"2024-12-26T21:58:05","slug":"python%e5%a6%82%e4%bd%95%e5%ae%9e%e7%8e%b0btm%e7%ae%97%e6%b3%95","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/973572.html","title":{"rendered":"python\u5982\u4f55\u5b9e\u73b0btm\u7b97\u6cd5"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24195703\/9aa56d8e-6202-41a5-933f-aa7b905b4ea5.webp\" alt=\"python\u5982\u4f55\u5b9e\u73b0btm\u7b97\u6cd5\" \/><\/p>\n<p><p> <strong>Python\u5b9e\u73b0BTM\u7b97\u6cd5\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u6b65\u9aa4\uff1a\u6570\u636e\u51c6\u5907\u3001\u8bcd\u6c47\u8868\u521b\u5efa\u3001\u6a21\u578b\u521d\u59cb\u5316\u3001\u6a21\u578b\u8bad\u7ec3\u3001\u4e3b\u9898\u5206\u5e03\u751f\u6210\u3001\u8bc4\u4f30\u6a21\u578b\u6027\u80fd\u3002<\/strong>BTM\uff08Biterm Topic Model\uff09\u662f\u4e00\u79cd\u9002\u5408\u77ed\u6587\u672c\u7684\u4e3b\u9898\u6a21\u578b\uff0c\u5b83\u901a\u8fc7\u5bf9\u8bcd\u5bf9\u8fdb\u884c\u5efa\u6a21\uff0c\u514b\u670d\u4e86\u4f20\u7edf\u4e3b\u9898\u6a21\u578b\u5728\u77ed\u6587\u672c\u4e0a\u8868\u73b0\u4e0d\u4f73\u7684\u95ee\u9898\u3002<strong>\u6570\u636e\u51c6\u5907<\/strong>\u662fBTM\u7b97\u6cd5\u5b9e\u73b0\u7684\u7b2c\u4e00\u6b65\uff0c\u9700\u8981\u5bf9\u6587\u672c\u8fdb\u884c\u9884\u5904\u7406\uff0c\u5305\u62ec\u5206\u8bcd\u3001\u53bb\u9664\u505c\u7528\u8bcd\u7b49\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u5728Python\u4e2d\u5b9e\u73b0BTM\u7b97\u6cd5\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u6570\u636e\u51c6\u5907<\/p>\n<\/p>\n<p><p>\u5728\u5b9e\u73b0BTM\u7b97\u6cd5\u4e4b\u524d\uff0c\u9996\u5148\u9700\u8981\u51c6\u5907\u6570\u636e\u3002\u6570\u636e\u7684\u51c6\u5907\u8fc7\u7a0b\u5305\u62ec\u6570\u636e\u7684\u6536\u96c6\u3001\u6e05\u6d17\u4ee5\u53ca\u9884\u5904\u7406\u3002<\/p>\n<\/p>\n<ol>\n<li>\u6570\u636e\u6536\u96c6<\/li>\n<\/ol>\n<p><p>\u6570\u636e\u6536\u96c6\u662f\u5b9e\u73b0\u4efb\u4f55<a href=\"https:\/\/docs.pingcode.com\/ask\/59192.html\" target=\"_blank\">\u673a\u5668\u5b66\u4e60<\/a>\u7b97\u6cd5\u7684\u7b2c\u4e00\u6b65\u3002\u5728\u5b9e\u73b0BTM\u7b97\u6cd5\u65f6\uff0c\u53ef\u4ee5\u9009\u62e9\u4f7f\u7528\u793e\u4ea4\u5a92\u4f53\u5e73\u53f0\u4e0a\u7684\u77ed\u6587\u672c\u6570\u636e\uff0c\u5982\u63a8\u7279\u3001\u5fae\u535a\u7b49\u3002\u4e5f\u53ef\u4ee5\u4f7f\u7528\u5176\u4ed6\u77ed\u6587\u672c\u6570\u636e\u96c6\uff0c\u5982\u65b0\u95fb\u6807\u9898\u3001\u5546\u54c1\u8bc4\u8bba\u7b49\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li>\u6570\u636e\u6e05\u6d17<\/li>\n<\/ol>\n<p><p>\u5728\u6570\u636e\u6536\u96c6\u5b8c\u6210\u540e\uff0c\u9700\u8981\u5bf9\u6570\u636e\u8fdb\u884c\u6e05\u6d17\u3002\u6570\u636e\u6e05\u6d17\u7684\u8fc7\u7a0b\u901a\u5e38\u5305\u62ec\u53bb\u9664\u91cd\u590d\u6570\u636e\u3001\u53bb\u9664\u65e0\u5173\u6570\u636e\u3001\u5904\u7406\u7f3a\u5931\u503c\u7b49\u3002\u5728\u5904\u7406\u6587\u672c\u6570\u636e\u65f6\uff0c\u5c24\u5176\u9700\u8981\u6ce8\u610f\u53bb\u9664HTML\u6807\u7b7e\u3001\u53bb\u9664\u7279\u6b8a\u5b57\u7b26\u3001\u6807\u70b9\u7b26\u53f7\u7b49\u3002<\/p>\n<\/p>\n<ol start=\"3\">\n<li>\u6570\u636e\u9884\u5904\u7406<\/li>\n<\/ol>\n<p><p>\u6570\u636e\u9884\u5904\u7406\u662f\u5b9e\u73b0BTM\u7b97\u6cd5\u7684\u5173\u952e\u6b65\u9aa4\u4e4b\u4e00\u3002\u5728\u6570\u636e\u9884\u5904\u7406\u65f6\uff0c\u9700\u8981\u5bf9\u6587\u672c\u8fdb\u884c\u5206\u8bcd\u3001\u53bb\u9664\u505c\u7528\u8bcd\u3001\u8bcd\u5e72\u5316\u7b49\u3002\u53ef\u4ee5\u4f7f\u7528Python\u7684NLTK\u5e93\u6216\u5176\u4ed6\u81ea\u7136\u8bed\u8a00\u5904\u7406\u5e93\u6765\u5b8c\u6210\u8fd9\u4e9b\u4efb\u52a1\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import nltk<\/p>\n<p>from nltk.corpus import stopwords<\/p>\n<p>from nltk.tokenize import word_tokenize<\/p>\n<h2><strong>\u4e0b\u8f7d\u505c\u7528\u8bcd\u5e93<\/strong><\/h2>\n<p>nltk.download(&#39;stopwords&#39;)<\/p>\n<p>nltk.download(&#39;punkt&#39;)<\/p>\n<p>def preprocess_text(text):<\/p>\n<p>    # \u5206\u8bcd<\/p>\n<p>    words = word_tokenize(text.lower())<\/p>\n<p>    # \u53bb\u9664\u505c\u7528\u8bcd<\/p>\n<p>    words = [word for word in words if word not in stopwords.words(&#39;english&#39;)]<\/p>\n<p>    # \u53bb\u9664\u975e\u5b57\u6bcd\u5b57\u7b26<\/p>\n<p>    words = [word for word in words if word.isalpha()]<\/p>\n<p>    return words<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e8c\u3001\u8bcd\u6c47\u8868\u521b\u5efa<\/p>\n<\/p>\n<p><p>\u5728\u6570\u636e\u9884\u5904\u7406\u5b8c\u6210\u540e\uff0c\u9700\u8981\u521b\u5efa\u8bcd\u6c47\u8868\u3002\u8bcd\u6c47\u8868\u7528\u4e8e\u8bb0\u5f55\u6240\u6709\u5728\u6587\u672c\u4e2d\u51fa\u73b0\u7684\u8bcd\u6c47\uff0c\u5e76\u4e3a\u6bcf\u4e2a\u8bcd\u6c47\u5206\u914d\u4e00\u4e2a\u552f\u4e00\u7684\u7d22\u5f15\u3002<\/p>\n<\/p>\n<ol>\n<li>\u521b\u5efa\u8bcd\u6c47\u8868<\/li>\n<\/ol>\n<p><p>\u53ef\u4ee5\u4f7f\u7528Python\u7684collections\u5e93\u4e2d\u7684Counter\u7c7b\u6765\u521b\u5efa\u8bcd\u6c47\u8868\u3002Counter\u7c7b\u53ef\u4ee5\u8bb0\u5f55\u6bcf\u4e2a\u8bcd\u6c47\u51fa\u73b0\u7684\u6b21\u6570\uff0c\u5e76\u53ef\u4ee5\u6839\u636e\u51fa\u73b0\u6b21\u6570\u5bf9\u8bcd\u6c47\u8fdb\u884c\u6392\u5e8f\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from collections import Counter<\/p>\n<p>def create_vocabulary(texts):<\/p>\n<p>    vocab_counter = Counter()<\/p>\n<p>    for text in texts:<\/p>\n<p>        words = preprocess_text(text)<\/p>\n<p>        vocab_counter.update(words)<\/p>\n<p>    vocab = {word: i for i, (word, _) in enumerate(vocab_counter.items())}<\/p>\n<p>    return vocab<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e09\u3001\u6a21\u578b\u521d\u59cb\u5316<\/p>\n<\/p>\n<p><p>\u5728\u521b\u5efa\u8bcd\u6c47\u8868\u540e\uff0c\u9700\u8981\u521d\u59cb\u5316BTM\u6a21\u578b\u7684\u53c2\u6570\u3002BTM\u6a21\u578b\u7684\u53c2\u6570\u5305\u62ec\u4e3b\u9898\u6570\u3001\u8bcd\u6c47\u8868\u5927\u5c0f\u7b49\u3002<\/p>\n<\/p>\n<ol>\n<li>\u521d\u59cb\u5316\u6a21\u578b\u53c2\u6570<\/li>\n<\/ol>\n<p><p>\u5728\u521d\u59cb\u5316\u6a21\u578b\u53c2\u6570\u65f6\uff0c\u9700\u8981\u6839\u636e\u5177\u4f53\u7684\u6570\u636e\u96c6\u548c\u4efb\u52a1\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u4e3b\u9898\u6570\u3002\u4e00\u822c\u6765\u8bf4\uff0c\u4e3b\u9898\u6570\u53ef\u4ee5\u8bbe\u7f6e\u4e3a10\u5230100\u4e4b\u95f4\u3002\u8bcd\u6c47\u8868\u5927\u5c0f\u5219\u7531\u524d\u4e00\u6b65\u521b\u5efa\u7684\u8bcd\u6c47\u8868\u51b3\u5b9a\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">class BTM:<\/p>\n<p>    def __init__(self, num_topics, vocab_size):<\/p>\n<p>        self.num_topics = num_topics<\/p>\n<p>        self.vocab_size = vocab_size<\/p>\n<p>        # \u521d\u59cb\u5316\u5176\u4ed6\u6a21\u578b\u53c2\u6570<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u56db\u3001\u6a21\u578b\u8bad\u7ec3<\/p>\n<\/p>\n<p><p>\u5728\u6a21\u578b\u521d\u59cb\u5316\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u5f00\u59cb\u8bad\u7ec3BTM\u6a21\u578b\u3002\u6a21\u578b\u8bad\u7ec3\u7684\u8fc7\u7a0b\u5305\u62ec\u8bcd\u5bf9\u751f\u6210\u3001\u6a21\u578b\u53c2\u6570\u66f4\u65b0\u7b49\u3002<\/p>\n<\/p>\n<ol>\n<li>\u8bcd\u5bf9\u751f\u6210<\/li>\n<\/ol>\n<p><p>\u5728\u8bad\u7ec3BTM\u6a21\u578b\u65f6\uff0c\u9700\u8981\u9996\u5148\u751f\u6210\u8bcd\u5bf9\u3002\u8bcd\u5bf9\u662f\u6307\u5728\u540c\u4e00\u4e2a\u77ed\u6587\u672c\u4e2d\u51fa\u73b0\u7684\u4e24\u4e2a\u8bcd\u3002\u53ef\u4ee5\u4f7f\u7528Python\u7684itertools\u5e93\u4e2d\u7684combinations\u51fd\u6570\u6765\u751f\u6210\u8bcd\u5bf9\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from itertools import combinations<\/p>\n<p>def generate_biterms(texts, vocab):<\/p>\n<p>    biterms = []<\/p>\n<p>    for text in texts:<\/p>\n<p>        words = preprocess_text(text)<\/p>\n<p>        word_indices = [vocab[word] for word in words if word in vocab]<\/p>\n<p>        biterms.extend(combinations(word_indices, 2))<\/p>\n<p>    return biterms<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li>\u6a21\u578b\u53c2\u6570\u66f4\u65b0<\/li>\n<\/ol>\n<p><p>\u5728\u751f\u6210\u8bcd\u5bf9\u540e\uff0c\u9700\u8981\u6839\u636e\u8bcd\u5bf9\u66f4\u65b0\u6a21\u578b\u53c2\u6570\u3002\u53ef\u4ee5\u4f7f\u7528\u5409\u5e03\u65af\u91c7\u6837\u7b97\u6cd5\u6765\u66f4\u65b0\u6a21\u578b\u53c2\u6570\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<p>def update_parameters(biterms, num_topics, vocab_size):<\/p>\n<p>    # \u521d\u59cb\u5316\u6a21\u578b\u53c2\u6570<\/p>\n<p>    topic_word_count = np.zeros((num_topics, vocab_size))<\/p>\n<p>    topic_count = np.zeros(num_topics)<\/p>\n<p>    # \u5409\u5e03\u65af\u91c7\u6837\u66f4\u65b0\u6a21\u578b\u53c2\u6570<\/p>\n<p>    for b in biterms:<\/p>\n<p>        # \u968f\u673a\u521d\u59cb\u5316\u4e3b\u9898<\/p>\n<p>        z = np.random.randint(num_topics)<\/p>\n<p>        topic_word_count[z, b[0]] += 1<\/p>\n<p>        topic_word_count[z, b[1]] += 1<\/p>\n<p>        topic_count[z] += 1<\/p>\n<p>    # \u66f4\u65b0\u6a21\u578b\u53c2\u6570<\/p>\n<p>    # ...<\/p>\n<p>    return topic_word_count, topic_count<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e94\u3001\u4e3b\u9898\u5206\u5e03\u751f\u6210<\/p>\n<\/p>\n<p><p>\u5728\u6a21\u578b\u8bad\u7ec3\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528\u8bad\u7ec3\u597d\u7684\u6a21\u578b\u751f\u6210\u6587\u672c\u7684\u4e3b\u9898\u5206\u5e03\u3002<\/p>\n<\/p>\n<ol>\n<li>\u751f\u6210\u4e3b\u9898\u5206\u5e03<\/li>\n<\/ol>\n<p><p>\u53ef\u4ee5\u4f7f\u7528\u8bad\u7ec3\u597d\u7684\u6a21\u578b\u53c2\u6570\u751f\u6210\u6bcf\u4e2a\u6587\u672c\u7684\u4e3b\u9898\u5206\u5e03\u3002\u4e3b\u9898\u5206\u5e03\u8868\u793a\u6bcf\u4e2a\u6587\u672c\u5c5e\u4e8e\u6bcf\u4e2a\u4e3b\u9898\u7684\u6982\u7387\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def infer_topic_distribution(text, vocab, num_topics, topic_word_count, topic_count):<\/p>\n<p>    words = preprocess_text(text)<\/p>\n<p>    word_indices = [vocab[word] for word in words if word in vocab]<\/p>\n<p>    # \u8ba1\u7b97\u4e3b\u9898\u5206\u5e03<\/p>\n<p>    # ...<\/p>\n<p>    return topic_distribution<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u516d\u3001\u8bc4\u4f30\u6a21\u578b\u6027\u80fd<\/p>\n<\/p>\n<p><p>\u5728\u751f\u6210\u4e3b\u9898\u5206\u5e03\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u8ba1\u7b97\u56f0\u60d1\u5ea6\u7b49\u6307\u6807\u6765\u8bc4\u4f30\u6a21\u578b\u6027\u80fd\u3002<\/p>\n<\/p>\n<ol>\n<li>\u8ba1\u7b97\u56f0\u60d1\u5ea6<\/li>\n<\/ol>\n<p><p>\u56f0\u60d1\u5ea6\u662f\u8bc4\u4f30\u4e3b\u9898\u6a21\u578b\u6027\u80fd\u7684\u5e38\u7528\u6307\u6807\u3002\u56f0\u60d1\u5ea6\u8d8a\u4f4e\uff0c\u8868\u793a\u6a21\u578b\u6027\u80fd\u8d8a\u597d\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def calculate_perplexity(texts, vocab, num_topics, topic_word_count, topic_count):<\/p>\n<p>    total_log_likelihood = 0<\/p>\n<p>    total_words = 0<\/p>\n<p>    for text in texts:<\/p>\n<p>        words = preprocess_text(text)<\/p>\n<p>        word_indices = [vocab[word] for word in words if word in vocab]<\/p>\n<p>        # \u8ba1\u7b97\u6587\u672c\u7684\u5bf9\u6570\u4f3c\u7136<\/p>\n<p>        # ...<\/p>\n<p>        total_log_likelihood += log_likelihood<\/p>\n<p>        total_words += len(word_indices)<\/p>\n<p>    perplexity = np.exp(-total_log_likelihood \/ total_words)<\/p>\n<p>    return perplexity<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4ee5\u4e0a\u662f\u5b9e\u73b0BTM\u7b97\u6cd5\u7684\u57fa\u672c\u6b65\u9aa4\u3002\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u53ef\u4ee5\u5728Python\u4e2d\u5b9e\u73b0BTM\u7b97\u6cd5\uff0c\u5e76\u5e94\u7528\u4e8e\u77ed\u6587\u672c\u7684\u4e3b\u9898\u5efa\u6a21\u4efb\u52a1\u3002\u5728\u5177\u4f53\u5b9e\u73b0\u65f6\uff0c\u53ef\u4ee5\u6839\u636e\u5177\u4f53\u7684\u6570\u636e\u96c6\u548c\u4efb\u52a1\u9700\u6c42\uff0c\u5bf9\u6a21\u578b\u53c2\u6570\u548c\u5b9e\u73b0\u7ec6\u8282\u8fdb\u884c\u8c03\u6574\u548c\u4f18\u5316\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u4ec0\u4e48\u662fBTM\u7b97\u6cd5\uff0c\u5b83\u7684\u4e3b\u8981\u5e94\u7528\u9886\u57df\u6709\u54ea\u4e9b\uff1f<\/strong><br \/>BTM\uff08Biterm Topic Model\uff09\u7b97\u6cd5\u662f\u4e00\u79cd\u7528\u4e8e\u6587\u672c\u4e3b\u9898\u5efa\u6a21\u7684\u6280\u672f\uff0c\u7279\u522b\u9002\u5408\u5904\u7406\u77ed\u6587\u672c\u6570\u636e\u3002\u5b83\u901a\u8fc7\u5206\u6790\u8bcd\u5bf9\u7684\u5171\u73b0\u5173\u7cfb\u6765\u6355\u6349\u6587\u672c\u4e2d\u7684\u4e3b\u9898\u4fe1\u606f\u3002BTM\u7b97\u6cd5\u5728\u793e\u4ea4\u5a92\u4f53\u5206\u6790\u3001\u6587\u6863\u805a\u7c7b\u3001\u63a8\u8350\u7cfb\u7edf\u4ee5\u53ca\u4fe1\u606f\u68c0\u7d22\u7b49\u9886\u57df\u5f97\u5230\u4e86\u5e7f\u6cdb\u5e94\u7528\uff0c\u80fd\u591f\u6709\u6548\u5730\u5e2e\u52a9\u7528\u6237\u7406\u89e3\u548c\u7ec4\u7ec7\u6587\u672c\u6570\u636e\u3002<\/p>\n<p><strong>\u5728Python\u4e2d\u5b9e\u73b0BTM\u7b97\u6cd5\u9700\u8981\u54ea\u4e9b\u4f9d\u8d56\u5e93\uff1f<\/strong><br \/>\u8981\u5728Python\u4e2d\u5b9e\u73b0BTM\u7b97\u6cd5\uff0c\u901a\u5e38\u9700\u8981\u4ee5\u4e0b\u51e0\u4e2a\u4f9d\u8d56\u5e93\uff1aNumPy\uff08\u7528\u4e8e\u6570\u503c\u8ba1\u7b97\uff09\u3001Pandas\uff08\u7528\u4e8e\u6570\u636e\u5904\u7406\uff09\u3001\u4ee5\u53caSciPy\uff08\u7528\u4e8e\u79d1\u5b66\u8ba1\u7b97\uff09\u3002\u6b64\u5916\uff0c\u53ef\u80fd\u8fd8\u9700\u8981NLTK\u6216spaCy\u6765\u8fdb\u884c\u6587\u672c\u9884\u5904\u7406\uff0c\u5982\u5206\u8bcd\u548c\u53bb\u9664\u505c\u7528\u8bcd\u7b49\u3002\u786e\u4fdd\u5b89\u88c5\u8fd9\u4e9b\u5e93\u53ef\u4ee5\u4e3aBTM\u7b97\u6cd5\u7684\u5b9e\u65bd\u63d0\u4f9b\u826f\u597d\u7684\u57fa\u7840\u3002<\/p>\n<p><strong>\u5982\u4f55\u8fdb\u884cBTM\u7b97\u6cd5\u7684\u53c2\u6570\u8c03\u6574\uff0c\u4ee5\u4f18\u5316\u6a21\u578b\u6548\u679c\uff1f<\/strong><br \/>\u6a21\u578b\u53c2\u6570\u7684\u9009\u62e9\u5bf9BTM\u7b97\u6cd5\u7684\u6027\u80fd\u6709\u663e\u8457\u5f71\u54cd\u3002\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u8c03\u6574\u4e3b\u9898\u6570\u91cf\u3001\u8fed\u4ee3\u6b21\u6570\u548c\u5b66\u4e60\u7387\u6765\u4f18\u5316\u6a21\u578b\u6548\u679c\u3002\u901a\u5e38\uff0c\u5efa\u8bae\u901a\u8fc7\u4ea4\u53c9\u9a8c\u8bc1\u7684\u65b9\u6cd5\u6765\u8bc4\u4f30\u4e0d\u540c\u53c2\u6570\u7ec4\u5408\u7684\u6548\u679c\u3002\u6b64\u5916\uff0c\u89c2\u5bdf\u4e3b\u9898\u7684\u4e00\u81f4\u6027\u548c\u7a33\u5b9a\u6027\u4e5f\u662f\u53c2\u6570\u8c03\u6574\u7684\u91cd\u8981\u4f9d\u636e\uff0c\u9002\u65f6\u8fdb\u884c\u8c03\u6574\u53ef\u4ee5\u63d0\u9ad8\u6a21\u578b\u7684\u51c6\u786e\u6027\u548c\u53ef\u89e3\u91ca\u6027\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u5b9e\u73b0BTM\u7b97\u6cd5\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u6b65\u9aa4\uff1a\u6570\u636e\u51c6\u5907\u3001\u8bcd\u6c47\u8868\u521b\u5efa\u3001\u6a21\u578b\u521d\u59cb\u5316\u3001\u6a21\u578b\u8bad\u7ec3\u3001\u4e3b\u9898\u5206\u5e03\u751f\u6210\u3001\u8bc4\u4f30\u6a21\u578b [&hellip;]","protected":false},"author":3,"featured_media":973580,"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\/973572"}],"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=973572"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/973572\/revisions"}],"predecessor-version":[{"id":973583,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/973572\/revisions\/973583"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/973580"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=973572"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=973572"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=973572"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}