{"id":50555,"date":"2023-03-04T07:45:13","date_gmt":"2024-01-10T05:32:34","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e8%ae%a9%e6%88%91%e4%bb%ac%e7%94%a8java%e5%b0%9d%e8%af%95%e4%b8%80%e4%b8%8bspark-word2vec%e3%80%82\/"},"modified":"2024-04-29T17:19:22","modified_gmt":"2024-04-29T09:19:22","slug":"%e8%ae%a9%e6%88%91%e4%bb%ac%e7%94%a8java%e5%b0%9d%e8%af%95%e4%b8%80%e4%b8%8bspark-word2vec%e3%80%82","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e8%ae%a9%e6%88%91%e4%bb%ac%e7%94%a8java%e5%b0%9d%e8%af%95%e4%b8%80%e4%b8%8bspark-word2vec%e3%80%82\/","title":{"rendered":"\u8ba9\u6211\u4eec\u7528Java\u5c1d\u8bd5\u4e00\u4e0bSpark Word2Vec"},"content":{"rendered":"<p>\u56e0\u4e3aJAVA\u6700\u5bb9\u6613\u7f16\u5199\uff0c\u6240\u4ee5\u6211\u5c1d\u8bd5\u5b89\u88c5\u4e86\u9002\u7528\u4e8eJava\u7684\u5e93\u3002\u4f46\u662f\uff0c\u7531\u4e8e\u5728C\u8bed\u8a00\u4e2d\u627e\u4e0d\u5230\u4e0b\u9762\u7684\u51fd\u6570\uff0c\u4f3c\u4e4e\u9700\u8981\u4e00\u4e9b\u989d\u5916\u7684\u6539\u8fdb\u3002\u770b\u8d77\u6765\u6682\u65f6\u65e0\u6cd5\u5411\u5df2\u521b\u5efa\u7684Word2Vec\u6a21\u578b\u6dfb\u52a0\u6570\u636e\uff0c\u6211\u4e0d\u559c\u6b22\u5fc5\u987b\u4ece\u5934\u5f00\u59cb\u8f93\u5165\u5927\u91cf\u6570\u636e\u7684\u65b9\u5f0f\u3002\u6211\u9700\u8981\u627e\u4e00\u4e9b\u5176\u4ed6\u65b9\u6cd5\u3002<\/p>\n<p>Word2Vec C \u793a\u4f8b<\/p>\n<p>\u6211\u4eec\u4e5f\u7b49\u4f1a\u513f\u8bd5\u8bd5\u3002<\/p>\n<blockquote><p>\u6a21\u578b.\u6700\u76f8\u4f3c(\u6b63[&#8216;\u5973\u4eba&#8217;\uff0c &#8216;\u56fd\u738b&#8217;]\uff0c\u8d1f[&#8216;\u7537\u4eba&#8217;])<br \/>\n\u6a21\u578b.\u4e0d\u5339\u914d(&#8220;\u65e9\u9910 \u9ea6\u7247 \u665a\u9910 \u5348\u9910&#8221;.split())<br \/>\n\u6a21\u578b.\u76f8\u4f3c\u5ea6(&#8216;\u5973\u4eba&#8217;\uff0c &#8216;\u7537\u4eba&#8217;)<\/p><\/blockquote>\n<h2>\u6b65\u9a5f<\/h2>\n<p>1. \u521b\u5efa\u4e00\u4e2a\u666e\u901a\u7684Java\u9879\u76ee\u3002<br \/>\n2. \u8f6c\u6362\u4e3aMaven\u9879\u76ee\u3002<br \/>\n3. \u5728pom.xml\u4e2d\u6dfb\u52a0MavenInstall\u3002<br \/>\n4. \u521b\u5efa\u4e00\u4e2a\u4e3b\u7c7b\u3002<\/p>\n<h2>\u5c06pom.xml\u6587\u4ef6\u4e2d\u7684\u5185\u5bb9\u8bb0\u5f55\u4e0b\u6765\uff0c\u5e76\u6267\u884cMavenInstall\u64cd\u4f5c\u3002<\/h2>\n<pre class=\"post-pre\"><code>&lt;project xmlns=\"http:\/\/maven.apache.org\/POM\/4.0.0\" xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\" xsi:schemaLocation=\"http:\/\/maven.apache.org\/POM\/4.0.0 http:\/\/maven.apache.org\/xsd\/maven-4.0.0.xsd\"&gt;\r\n  &lt;modelVersion&gt;4.0.0&lt;\/modelVersion&gt;\r\n  &lt;groupId&gt;SimpleSpark&lt;\/groupId&gt;\r\n  &lt;artifactId&gt;SimpleSpark&lt;\/artifactId&gt;\r\n  &lt;version&gt;0.0.1-SNAPSHOT&lt;\/version&gt;\r\n    &lt;dependencies&gt;\r\n        &lt;dependency&gt;\r\n            &lt;groupId&gt;org.apache.spark&lt;\/groupId&gt;\r\n            &lt;artifactId&gt;spark-core_2.10&lt;\/artifactId&gt;\r\n            &lt;version&gt;1.6.1&lt;\/version&gt;\r\n        &lt;\/dependency&gt;\r\n        &lt;dependency&gt;\r\n            &lt;groupId&gt;org.apache.spark&lt;\/groupId&gt;\r\n            &lt;artifactId&gt;spark-sql_2.10&lt;\/artifactId&gt;\r\n            &lt;version&gt;1.6.1&lt;\/version&gt;\r\n        &lt;\/dependency&gt;\r\n        &lt;dependency&gt;\r\n            &lt;groupId&gt;org.apache.spark&lt;\/groupId&gt;\r\n            &lt;artifactId&gt;spark-mllib_2.10&lt;\/artifactId&gt;\r\n            &lt;version&gt;1.6.1&lt;\/version&gt;\r\n        &lt;\/dependency&gt;\r\n    &lt;\/dependencies&gt;\r\n  &lt;build&gt;\r\n    &lt;sourceDirectory&gt;src&lt;\/sourceDirectory&gt;\r\n    &lt;plugins&gt;\r\n      &lt;plugin&gt;\r\n        &lt;artifactId&gt;maven-compiler-plugin&lt;\/artifactId&gt;\r\n        &lt;version&gt;3.1&lt;\/version&gt;\r\n        &lt;configuration&gt;\r\n          &lt;source&gt;1.8&lt;\/source&gt;\r\n          &lt;target&gt;1.8&lt;\/target&gt;\r\n        &lt;\/configuration&gt;\r\n      &lt;\/plugin&gt;\r\n    &lt;\/plugins&gt;\r\n  &lt;\/build&gt;\r\n&lt;\/project&gt;\r\n<\/code><\/pre>\n<h2>\u521b\u5efa\u4e00\u4e2a\u540d\u4e3amain\u7684\u7c7b\u3002<\/h2>\n<p>(Note: The translation provided is in Simplified Chinese)<\/p>\n<pre class=\"post-pre\"><code>package demo;\r\n\r\nimport java.io.File;\r\nimport java.io.IOException;\r\nimport java.util.ArrayList;\r\nimport java.util.Arrays;\r\nimport java.util.List;\r\n\r\nimport org.apache.spark.SparkConf;\r\nimport org.apache.spark.api.java.JavaRDD;\r\nimport org.apache.spark.api.java.JavaSparkContext;\r\nimport org.apache.spark.ml.feature.PolynomialExpansion;\r\nimport org.apache.spark.ml.feature.Word2Vec;\r\nimport org.apache.spark.ml.feature.Word2VecModel;\r\nimport org.apache.spark.sql.DataFrame;\r\nimport org.apache.spark.sql.Row;\r\nimport org.apache.spark.sql.RowFactory;\r\nimport org.apache.spark.sql.SQLContext;\r\nimport org.apache.spark.sql.types.ArrayType;\r\nimport org.apache.spark.sql.types.DataTypes;\r\nimport org.apache.spark.sql.types.Metadata;\r\nimport org.apache.spark.sql.types.StructField;\r\nimport org.apache.spark.sql.types.StructType;\r\n\r\npublic class W2VecApplication {\r\n    static String data_vec = \"\/tmp\/word2\/\";\r\n    static String data_model = \"\/tmp\/model\/\";\r\n    static SparkConf conf;\r\n    static JavaSparkContext jsc;\r\n    static SQLContext sqlContext;\r\n\r\n    public static void main(String[] args) {\r\n        conf = new SparkConf().setAppName(\"demo.W2VecApplication\").setMaster(\"local\");\r\n        jsc = new JavaSparkContext(conf);\r\n        sqlContext = new org.apache.spark.sql.SQLContext(jsc);\r\n\r\n        String input = \"The largest open source project in data processing\u00a5n\"\r\n                + \"Since its release, Apache Spark has seen rapid adoption by enterprises across a wide range of industries. Internet powerhouses such as Netflix, Yahoo, and eBay have deployed Spark at massive scale, collectively processing multiple petabytes of data on clusters of over 8,000 nodes. It has quickly become the largest open source community in big data, with over 1000 contributors from 250+ organizations.\u00a5n\"\r\n                + \"The team that created Apache Spark founded Databricks in 2013.\u00a5n\"\r\n                + \"Apache Spark is 100% open source, hosted at the vendor-independent Apache Software Foundation. At Databricks, we are fully committed to maintaining this open development model. Together with the Spark community, Databricks continues to contribute heavily to the Apache Spark project, through both development and community evangelism.\u00a5n\"\r\n                + \"At Databricks, we\u2019re working hard to make Spark easier to use and run than ever, through our efforts on both the Spark codebase and support materials around it. All of our work on Spark is open source and goes directly to Apache.\u00a5n\"\r\n                + \"Speed Engineered from the bottom-up for performance, Spark can be 100x faster than Hadoop for large scale data processing by exploiting in memory computing and other optimizations. Spark is also fast when data is stored on disk, and currently holds the world record for large-scale on-disk sorting.\u00a5n\"\r\n                + \"Ease of Use Spark has easy-to-use APIs for operating on large datasets. This includes a collection of over 100 operators for transforming data and familiar data frame APIs for manipulating semi-structured data.\u00a5n\"\r\n                + \"A Unified Engine Spark comes packaged with higher-level libraries, including support for SQL queries, streaming data, machine learning and graph processing. These standard libraries increase developer productivity and can be seamlessly combined to create complex workflows.\u00a5n\"\r\n                + \"Apache Spark is an open source cluster computing framework. Originally developed at the University of California, Berkeley's AMPLab, the Spark codebase was later donated to the Apache Software Foundation, which has maintained it since. Spark provides an interface for programming entire clusters with implicit data parallelism and fault-tolerance.\u00a5n\"\r\n                + \"Apache Spark provides programmers with an application programming interface centered on a data structure called the resilient distributed dataset (RDD), a read-only multiset of data items distributed over a cluster of machines, that is maintained in a fault-tolerant way.[1] It was developed in response to limitations in the MapReduce cluster computing paradigm, which forces a particular linear dataflow structure on distributed programs: MapReduce programs read input data from disk, map a function across the data, reduce the results of the map, and store reduction results on disk. Spark's RDDs function as a working set for distributed programs that offers a (deliberately) restricted form of distributed shared memory.[2]\u00a5n\"\r\n                + \"The availability of RDDs facilitates the implementation of both iterative algorithms, that visit their dataset multiple times in a loop, and interactive\/exploratory data analysis, i.e., the repeated database-style querying of data. The latency of such applications (compared to Apache Hadoop, a popular MapReduce implementation) may be reduced by several orders of magnitude.[1][3] Among the class of iterative algorithms are the training algorithms for machine learning systems, which formed the initial impetus for developing Apache Spark.[4]\u00a5n\"\r\n                + \"Apache Spark requires a cluster manager and a distributed storage system. For cluster management, Spark supports standalone (native Spark cluster), Hadoop YARN, or Apache Mesos.[5] For distributed storage, Spark can interface with a wide variety, including Hadoop Distributed File System (HDFS),[6] MapR File System (MapR-FS),[7] Cassandra,[8] OpenStack Swift, Amazon S3, Kudu, or a custom solution can be implemented. Spark also supports a pseudo-distributed local mode, usually used only for development or testing purposes, where distributed storage is not required and the local file system can be used instead; in such a scenario, Spark is run on a single machine with one executor per CPU core.\";\r\n\r\n        try {\r\n            \/\/  \u5b66\u7fd2\u30c7\u30fc\u30bf\u4f5c\u6210\r\n            startStudy(Arrays.asList(input.split(\"\u00a5n\")));\r\n            \/\/  \u5b66\u7fd2\u30c7\u30fc\u30bf\u304b\u3089\u691c\u7d22\r\n            findSomething(\"Spark\");\r\n\r\n        } catch (IOException e) {\r\n            \/\/ TODO Auto-generated catch block\r\n            e.printStackTrace();\r\n        }catch(IllegalStateException e2){\r\n\r\n        }\r\n    }\r\n\r\n    private static void startStudy(List&lt;String&gt; al) throws IOException{\r\n        \/\/ TODO Auto-generated method stub\r\n        PolynomialExpansion polyExpansion = new PolynomialExpansion()\r\n          .setInputCol(\"features\")\r\n          .setOutputCol(\"polyFeatures\")\r\n          .setDegree(3);\r\n\r\n        \/\/  \u6587\u7ae0\u3092\u3056\u3063\u304f\u308a\u8aad\u307e\u305b\u307e\u3059\r\n        List&lt;Row&gt; aljr = new ArrayList&lt;Row&gt;();\r\n        for(int i = 0 ; i &lt; al.size() ; i++){\r\n            aljr.add((Row)RowFactory.create(Arrays.asList(al.get(i).toString().split(\" \"))));\r\n        }\r\n        JavaRDD&lt;Row&gt; jrdd = jsc.parallelize(aljr);\r\n\r\n        StructType schema = new StructType(new StructField[]{\r\n          new StructField(\"text\", new ArrayType(DataTypes.StringType, true), false, Metadata.empty())\r\n        });\r\n        DataFrame documentDF = sqlContext.createDataFrame(jrdd, schema);\r\n\r\n        \/\/ Learn a mapping from words to Vectors.\r\n        Word2Vec word2Vec = new Word2Vec()\r\n          .setInputCol(\"text\")\r\n          .setOutputCol(\"result\")\r\n          .setVectorSize(3)\r\n          .setMinCount(0);\r\n\r\n        \/\/  Word2 vec model \u306e\u751f\u6210\r\n        Word2VecModel model = word2Vec.fit(documentDF);\r\n        DataFrame result = model.transform(documentDF);\r\n        for (Row r : result.select(\"result\").take(3)) {\r\n            System.out.println(r);\r\n        }\r\n\r\n        \/\/  \u4e00\u65e6\u30c7\u30fc\u30bf\u4fdd\u5b58\r\n        if(!new File(data_model).exists()){\r\n            model.save(data_model);\r\n        }else{\r\n            model.write().overwrite().save(data_model);\r\n        }       \r\n        if(!new File(data_vec).exists()){\r\n            word2Vec.save(data_vec);\r\n        }else{\r\n            word2Vec.write().overwrite().save(data_vec);\r\n        }       \r\n    }\r\n\r\n    private static void findSomething(String str) throws IllegalStateException{\r\n        \/\/  \u5148\u307b\u3069\u4fdd\u5b58\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u518d\u5229\u7528\r\n        Word2Vec vec = Word2Vec.load(data_vec);\r\n        Word2VecModel model = Word2VecModel.load(data_model);\r\n\r\n        \/\/ Find similar word\r\n        DataFrame similar = model.findSynonyms(str, 30);\r\n        for (int i = 0 ; i &lt; similar.count() ; i++) {\r\n            System.out.println(similar.showString(i,false));\r\n        }\r\n    }\r\n}\r\n<\/code><\/pre>\n<pre class=\"post-pre\"><code>+--------------+-------------------+\r\n|word          |similarity         |\r\n+--------------+-------------------+\r\n|system.       |0.2014637445894577 |\r\n|called        |0.19980325869996565|\r\n|analysis,     |0.1993920149609777 |\r\n|availability  |0.19908706675080787|\r\n|datasets.     |0.19904390575754743|\r\n|higher-level  |0.19838541460232392|\r\n|particular    |0.1955145561157753 |\r\n|Use           |0.19286837761820919|\r\n|powerhouses   |0.19223540828654095|\r\n|bottom-up     |0.19097962682578687|\r\n|or            |0.18865127679894006|\r\n|processing.   |0.18847629567307478|\r\n|nodes.        |0.18771307406284526|\r\n|Engine        |0.18674049047044267|\r\n|when          |0.1864894622682742 |\r\n|may           |0.1849541028612345 |\r\n|implicit      |0.181728914295441  |\r\n|linear        |0.179022874456727  |\r\n|Amazon        |0.1789115889397055 |\r\n|Apache.       |0.17816780927062123|\r\n|response      |0.17644830351552274|\r\n|it            |0.1755878682373225 |\r\n|purposes,     |0.17553053395023288|\r\n|collectively  |0.17349352919593652|\r\n|scale         |0.16585955085424214|\r\n|the           |0.1641250039271931 |\r\n|reduction     |0.16363822547590098|\r\n|record        |0.16354020270709446|\r\n|optimizations.|0.1595631774706085 |\r\n+--------------+-------------------+\r\nonly showing top 29 rows\r\n<\/code><\/pre>\n<p>\u6211\u4ece\u7ef4\u57fa\u767e\u79d1\u548cSpark\u7684\u6982\u8ff0\u4e2d\u83b7\u53d6\u4e86Spark\u7684\u8bf4\u660e\uff0c\u6240\u4ee5\u60f3\u7740\u80fd\u5426\u7406\u89e3\u5176\u6982\u8981\uff0c\u4e8e\u662f\u968f\u4fbf\u4ece\u4e0a\u9762\u8fde\u7eed\u7ec4\u5408\u4e86\u4e00\u4e9b\u8bcd\u8bed\uff0c\u770b\u80fd\u5426\u7ec4\u6210\u4e00\u53e5\u8bdd\u2026\u2026\u4f46\u662f\u4ec5\u6709\u8fd9\u4e9b\u4fe1\u606f\uff0c\u4e0d\u77e5\u9053\u5728\u8bf4\u4ec0\u4e48\u3002\u6211\u5f88\u60f3\u770b\u770b\u5386\u6b21\u4f1a\u8bae\u7684\u4f1a\u8bae\u8bb0\u5f55\u3002<\/p>\n<pre class=\"post-pre\"><code>System called \"Spark\uff11(\u5165\u529b\u3057\u305f\u6587\u5b57\uff09\". \r\nAnalysis datasets with higher-level availability, particular use of powerhouses and buttom-up or processing nodes Engine\r\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u56e0\u4e3aJAVA\u6700\u5bb9\u6613\u7f16\u5199\uff0c\u6240\u4ee5\u6211\u5c1d\u8bd5\u5b89\u88c5\u4e86\u9002\u7528\u4e8eJava\u7684\u5e93\u3002\u4f46\u662f\uff0c\u7531\u4e8e\u5728C\u8bed\u8a00\u4e2d\u627e\u4e0d\u5230\u4e0b\u9762\u7684\u51fd\u6570\uff0c\u4f3c\u4e4e\u9700\u8981\u4e00\u4e9b [&hellip;]<\/p>\n","protected":false},"author":12,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-50555","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u8ba9\u6211\u4eec\u7528Java\u5c1d\u8bd5\u4e00\u4e0bSpark Word2Vec - Blog - Silicon Cloud<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/\u8ba9\u6211\u4eec\u7528java\u5c1d\u8bd5\u4e00\u4e0bspark-word2vec\u3002\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u8ba9\u6211\u4eec\u7528Java\u5c1d\u8bd5\u4e00\u4e0bSpark Word2Vec\" \/>\n<meta property=\"og:description\" content=\"\u56e0\u4e3aJAVA\u6700\u5bb9\u6613\u7f16\u5199\uff0c\u6240\u4ee5\u6211\u5c1d\u8bd5\u5b89\u88c5\u4e86\u9002\u7528\u4e8eJava\u7684\u5e93\u3002\u4f46\u662f\uff0c\u7531\u4e8e\u5728C\u8bed\u8a00\u4e2d\u627e\u4e0d\u5230\u4e0b\u9762\u7684\u51fd\u6570\uff0c\u4f3c\u4e4e\u9700\u8981\u4e00\u4e9b [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u8ba9\u6211\u4eec\u7528java\u5c1d\u8bd5\u4e00\u4e0bspark-word2vec\u3002\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2024-01-10T05:32:34+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-29T09:19:22+00:00\" \/>\n<meta name=\"author\" content=\"\u9038, \u79d1\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u9038, \u79d1\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e8%ae%a9%e6%88%91%e4%bb%ac%e7%94%a8java%e5%b0%9d%e8%af%95%e4%b8%80%e4%b8%8bspark-word2vec%e3%80%82\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e8%ae%a9%e6%88%91%e4%bb%ac%e7%94%a8java%e5%b0%9d%e8%af%95%e4%b8%80%e4%b8%8bspark-word2vec%e3%80%82\/\",\"name\":\"\u8ba9\u6211\u4eec\u7528Java\u5c1d\u8bd5\u4e00\u4e0bSpark Word2Vec - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2024-01-10T05:32:34+00:00\",\"dateModified\":\"2024-04-29T09:19:22+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/85c1dae56e6ea1e695c73d33c684d487\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e8%ae%a9%e6%88%91%e4%bb%ac%e7%94%a8java%e5%b0%9d%e8%af%95%e4%b8%80%e4%b8%8bspark-word2vec%e3%80%82\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e8%ae%a9%e6%88%91%e4%bb%ac%e7%94%a8java%e5%b0%9d%e8%af%95%e4%b8%80%e4%b8%8bspark-word2vec%e3%80%82\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e8%ae%a9%e6%88%91%e4%bb%ac%e7%94%a8java%e5%b0%9d%e8%af%95%e4%b8%80%e4%b8%8bspark-word2vec%e3%80%82\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u8ba9\u6211\u4eec\u7528Java\u5c1d\u8bd5\u4e00\u4e0bSpark Word2Vec\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/85c1dae56e6ea1e695c73d33c684d487\",\"name\":\"\u9038, \u79d1\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c94f6d9cbbfbca863fab309840bd690c153c95f8490c290ad2ed54dd693dad16?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c94f6d9cbbfbca863fab309840bd690c153c95f8490c290ad2ed54dd693dad16?s=96&d=mm&r=g\",\"caption\":\"\u9038, \u79d1\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/keyi\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e8%ae%a9%e6%88%91%e4%bb%ac%e7%94%a8java%e5%b0%9d%e8%af%95%e4%b8%80%e4%b8%8bspark-word2vec%e3%80%82\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u8ba9\u6211\u4eec\u7528Java\u5c1d\u8bd5\u4e00\u4e0bSpark Word2Vec - Blog - Silicon Cloud","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/\u8ba9\u6211\u4eec\u7528java\u5c1d\u8bd5\u4e00\u4e0bspark-word2vec\u3002\/","og_locale":"zh_CN","og_type":"article","og_title":"\u8ba9\u6211\u4eec\u7528Java\u5c1d\u8bd5\u4e00\u4e0bSpark Word2Vec","og_description":"\u56e0\u4e3aJAVA\u6700\u5bb9\u6613\u7f16\u5199\uff0c\u6240\u4ee5\u6211\u5c1d\u8bd5\u5b89\u88c5\u4e86\u9002\u7528\u4e8eJava\u7684\u5e93\u3002\u4f46\u662f\uff0c\u7531\u4e8e\u5728C\u8bed\u8a00\u4e2d\u627e\u4e0d\u5230\u4e0b\u9762\u7684\u51fd\u6570\uff0c\u4f3c\u4e4e\u9700\u8981\u4e00\u4e9b [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u8ba9\u6211\u4eec\u7528java\u5c1d\u8bd5\u4e00\u4e0bspark-word2vec\u3002\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2024-01-10T05:32:34+00:00","article_modified_time":"2024-04-29T09:19:22+00:00","author":"\u9038, \u79d1","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u9038, \u79d1","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"7 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e8%ae%a9%e6%88%91%e4%bb%ac%e7%94%a8java%e5%b0%9d%e8%af%95%e4%b8%80%e4%b8%8bspark-word2vec%e3%80%82\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e8%ae%a9%e6%88%91%e4%bb%ac%e7%94%a8java%e5%b0%9d%e8%af%95%e4%b8%80%e4%b8%8bspark-word2vec%e3%80%82\/","name":"\u8ba9\u6211\u4eec\u7528Java\u5c1d\u8bd5\u4e00\u4e0bSpark Word2Vec - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2024-01-10T05:32:34+00:00","dateModified":"2024-04-29T09:19:22+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/85c1dae56e6ea1e695c73d33c684d487"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e8%ae%a9%e6%88%91%e4%bb%ac%e7%94%a8java%e5%b0%9d%e8%af%95%e4%b8%80%e4%b8%8bspark-word2vec%e3%80%82\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e8%ae%a9%e6%88%91%e4%bb%ac%e7%94%a8java%e5%b0%9d%e8%af%95%e4%b8%80%e4%b8%8bspark-word2vec%e3%80%82\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e8%ae%a9%e6%88%91%e4%bb%ac%e7%94%a8java%e5%b0%9d%e8%af%95%e4%b8%80%e4%b8%8bspark-word2vec%e3%80%82\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u8ba9\u6211\u4eec\u7528Java\u5c1d\u8bd5\u4e00\u4e0bSpark Word2Vec"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/85c1dae56e6ea1e695c73d33c684d487","name":"\u9038, \u79d1","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c94f6d9cbbfbca863fab309840bd690c153c95f8490c290ad2ed54dd693dad16?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c94f6d9cbbfbca863fab309840bd690c153c95f8490c290ad2ed54dd693dad16?s=96&d=mm&r=g","caption":"\u9038, \u79d1"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/keyi\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e8%ae%a9%e6%88%91%e4%bb%ac%e7%94%a8java%e5%b0%9d%e8%af%95%e4%b8%80%e4%b8%8bspark-word2vec%e3%80%82\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/50555","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=50555"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/50555\/revisions"}],"predecessor-version":[{"id":86594,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/50555\/revisions\/86594"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=50555"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=50555"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=50555"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}