国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

Home Backend Development PHP Tutorial 有用過php+SCWS的嗎? 有有關(guān)問題,沒實現(xiàn)分詞,只是分字

有用過php+SCWS的嗎? 有有關(guān)問題,沒實現(xiàn)分詞,只是分字

Jun 13, 2016 pm 12:20 PM
array gt nbsp word

有用過php+SCWS的嗎? 有問題,沒實現(xiàn)分詞,只是分字。
有用過php+SCWS的嗎??有問題,沒實現(xiàn)分詞,只是分字。

phpinfo里已經(jīng)有了

scws<br /><br />SCWS support	Enabled<br />SCWS Description	Simple Chinese Words Segmentation<br />PECL Module version	0.2.2<br />SCWS Library	1.2.2<br />SCWS BugReport	http://www.xunsearch.com/scws

但是如下的代碼
<br /><?<br />$str="考試前20分鐘,憑準考證和身份證進入考場,對號入座,并將準考證、身份證放在桌面右上角";<br />$so = scws_new();<br />$so->send_text($str);<br />$temp=$so->get_result();<br />$so->close();<br />print_r($temp);<br />?><br />

只能產(chǎn)生如下的結(jié)果
<br /><br />Array<br />(<br />    [0] => Array<br />        (<br />            [word] => 考<br />            [off] => 0<br />            [len] => 3<br />            [idf] => 0<br />            [attr] => un<br />        )<br /><br />    [1] => Array<br />        (<br />            [word] => 試<br />            [off] => 3<br />            [len] => 3<br />            [idf] => 0<br />            [attr] => un<br />        )<br /><br />    [2] => Array<br />        (<br />            [word] => 前<br />            [off] => 6<br />            [len] => 3<br />            [idf] => 0<br />            [attr] => un<br />        )<br /><br />    [3] => Array<br />        (<br />            [word] => 20<br />            [off] => 9<br />            [len] => 2<br />            [idf] => 0<br />            [attr] => un<br />        )<br /><br />    [4] => Array<br />        (<br />            [word] => 分<br />            [off] => 11<br />            [len] => 3<br />            [idf] => 0<br />            [attr] => un<br />        )<br /><br />    [5] => Array<br />        (<br />            [word] => 鐘<br />            [off] => 14<br />            [len] => 3<br />            [idf] => 0<br />            [attr] => un<br />        )<br /><br />    [6] => Array<br />        (<br />            [word] => ,<br />            [off] => 17<br />            [len] => 3<br />            [idf] => 0<br />            [attr] => un<br />        )<br /><br />    [7] => Array<br />        (<br />            [word] => 憑<br />            [off] => 20<br />            [len] => 3<br />            [idf] => 0<br />            [attr] => un<br />        )<br /><br />    [8] => Array<br />        (<br />            [word] => 準<br />            [off] => 23<br />            [len] => 3<br />            [idf] => 0<br />            [attr] => un<br />        )<br /><br />    [9] => Array<br />        (<br />            [word] => 考<br />            [off] => 26<br />            [len] => 3<br />            [idf] => 0<br />            [attr] => un<br />        )<br /><br />    [10] => Array<br />        (<br />            [word] => 證<br />            [off] => 29<br />            [len] => 3<br />            [idf] => 0<br />            [attr] => un<br />        )<br /><br />    [11] => Array<br />        (<br />            [word] => 和<br />            [off] => 32<br />            [len] => 3<br />            [idf] => 0<br />            [attr] => un<br />        )<br /><br />    [12] => Array<br />        (<br />            [word] => 身<br />            [off] => 35<br />            [len] => 3<br />            [idf] => 0<br />            [attr] => un<br />        )<br /><br />    [13] => Array<br />        (<br />            [word] => 份<br />            [off] => 38<br />            [len] => 3<br />            [idf] => 0<br />            [attr] => un<br />        )<br /><br />    [14] => Array<br />        (<br />            [word] => 證<br />            [off] => 41<br />            [len] => 3<br />            [idf] => 0<br />            [attr] => un<br />        )<br /><br />    [15] => Array<br />        (<br />            [word] => 進<br />            [off] => 44<br />            [len] => 3<br />            [idf] => 0<br />            [attr] => un<br />        )<br /><br />    [16] => Array<br />        (<br />            [word] => 入<br />            [off] => 47<br />            [len] => 3<br />            [idf] => 0<br />            [attr] => un<br />        )<br /><br />    [17] => Array<br />        (<br />            [word] => 考<br />            [off] => 50<br />            [len] => 3<br />            [idf] => 0<br />            [attr] => un<br />        )<br /><br />    [18] => Array<br />        (<br />            [word] => 場<br />            [off] => 53<br />            [len] => 3<br />            [idf] => 0<br />            [attr] => un<br />        )<br /><br />    [19] => Array<br />        (<br />            [word] => ,<br />            [off] => 56<br />            [len] => 3<br />            [idf] => 0<br />            [attr] => un<br />        )<br /><br />    [20] => Array<br />        (<br />            [word] => 對<br />            [off] => 59<br />            [len] => 3<br />            [idf] => 0<br />            [attr] => un<br />        )<br /><br />    [21] => Array<br />        (<br />            [word] => 號<br />            [off] => 62<br />            [len] => 3<br />            [idf] => 0<br />            [attr] => un<br />        )<br /><br />    [22] => Array<br />        (<br />            [word] => 入<br />            [off] => 65<br />            [len] => 3<br />            [idf] => 0<br />            [attr] => un<br />        )<br /><br />    [23] => Array<br />        (<br />            [word] => 座<br />            [off] => 68<br />            [len] => 3<br />            [idf] => 0<br />            [attr] => un<br />        )<br /><br />    [24] => Array<br />        (<br />            [word] => ,<br />            [off] => 71<br />            [len] => 3<br />            [idf] => 0<br />            [attr] => un<br />        )<br /><br />    [25] => Array<br />        (<br />            [word] => 并<br />            [off] => 74<br />            [len] => 3<br />            [idf] => 0<br />            [attr] => un<br />        )<br /><br />    [26] => Array<br />        (<br />            [word] => 將<br />            [off] => 77<br />            [len] => 3<br />            [idf] => 0<br />            [attr] => un<br />        )<br /><br />    [27] => Array<br />        (<br />            [word] => 準<br />            [off] => 80<br />            [len] => 3<br />            [idf] => 0<br />            [attr] => un<br />        )<br /><br />    [28] => Array<br />        (<br />            [word] => 考<br />            [off] => 83<br />            [len] => 3<br />            [idf] => 0<br />            [attr] => un<br />        )<br /><br />    [29] => Array<br />        (<br />            [word] => 證<br />            [off] => 86<br />            [len] => 3<br />            [idf] => 0<br />            [attr] => un<br />        )<br /><br />    [30] => Array<br />        (<br />            [word] => 、<br />            [off] => 89<br />            [len] => 3<br />            [idf] => 0<br />            [attr] => un<br />        )<br /><br />    [31] => Array<br />        (<br />            [word] => 身<br />            [off] => 92<br />            [len] => 3<br />            [idf] => 0<br />            [attr] => un<br />        )<br /><br />    [32] => Array<br />        (<br />            [word] => 份<br />            [off] => 95<br />            [len] => 3<br />            [idf] => 0<br />            [attr] => un<br />        )<br /><br />    [33] => Array<br />        (<br />            [word] => 證<br />            [off] => 98<br />            [len] => 3<br />            [idf] => 0<br />            [attr] => un<br />        )<br /><br />    [34] => Array<br />        (<br />            [word] => 放<br />            [off] => 101<br />            [len] => 3<br />            [idf] => 0<br />            [attr] => un<br />        )<br /><br />    [35] => Array<br />        (<br />            [word] => 在<br />            [off] => 104<br />            [len] => 3<br />            [idf] => 0<br />            [attr] => un<br />        )<br /><br />    [36] => Array<br />        (<br />            [word] => 桌<br />            [off] => 107<br />            [len] => 3<br />            [idf] => 0<br />            [attr] => un<br />        )<br /><br />    [37] => Array<br />        (<br />            [word] => 面<br />            [off] => 110<br />            [len] => 3<br />            [idf] => 0<br />            [attr] => un<br />        )<br /><br />    [38] => Array<br />        (<br />            [word] => 右<br />            [off] => 113<br />            [len] => 3<br />            [idf] => 0<br />            [attr] => un<br />        )<br /><br />    [39] => Array<br />        (<br />            [word] => 上<br />            [off] => 116<br />            [len] => 3<br />            [idf] => 0<br />            [attr] => un<br />        )<br /><br />    [40] => Array<br />        (<br />            [word] => 角<br />            [off] => 119<br />            [len] => 3<br />            [idf] => 0<br />            [attr] => un<br />        )<br /><br />)<br /><br />

我是按照官方的文檔安裝的。難道是還需要額外的配置嗎?
------解決思路----------------------
字典路徑?jīng)]有配置好吧?
或者是字符集不對

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undress AI Tool

Undress AI Tool

Undress images for free

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to cancel automatic word wrapping in word How to cancel automatic word wrapping in word Mar 19, 2024 pm 10:16 PM

When editing content in a word document, lines may automatically wrap. If no adjustment is made at this time, it will have a great impact on our editing and make people very headache. What is going on? In fact, it is a problem with the ruler. Below, I will introduce the solution to how to cancel automatic word wrapping in word. I hope it can help everyone! After opening a Word document and entering text, when you try to copy and paste, the text may jump to a new line. In this case, you need to adjust the settings to solve this problem. 2. To solve this problem, we must first know the cause of this problem. At this time we click View under the toolbar. 3. Then click the &quot;Ruler&quot; option below. 4. At this time we will find that a ruler appears above the document with several conical markers on it.

Detailed explanation of how to display the ruler in Word and how to operate the ruler! Detailed explanation of how to display the ruler in Word and how to operate the ruler! Mar 20, 2024 am 10:46 AM

When we use Word, in order to edit the content more beautifully, we often use rulers. You should know that the rulers in Word include horizontal rulers and vertical rulers, which are used to display and adjust the document's page margins, paragraph indents, tabs, etc. So, how do you display the ruler in Word? Next, I will teach you how to set the ruler display. Students in need should quickly collect it! The steps are as follows: 1. First, we need to bring up the word ruler. The default word document does not display the word ruler. We only need to click the [View] button in word. 2. Then, we find the option of [Ruler] and check it. In this way, we can adjust the word ruler! Yes or no

How to add handwritten signature to word document How to add handwritten signature to word document Mar 20, 2024 pm 08:56 PM

Word documents are widely used due to their powerful functions. Not only can various formats be inserted into Word, such as pictures and tables, etc., but now for the integrity and authenticity of the files, many files require a manual signature at the end of the document. It sounds like this How to solve complex problems? Today I will teach you how to add a handwritten signature to a word document. Use a scanner, camera or mobile phone to scan or photograph the handwritten signature, and then use PS or other image editing software to perform necessary cropping on the image. 2. Select &quot;Insert - Picture - From File&quot; in the Word document where you want to insert the handwritten signature, and select the cropped handwritten signature. 3. Double-click the handwritten signature picture (or right-click the picture and select &quot;Set Picture Format&quot;), and the &quot;Set Picture Format&quot; pops up.

How to set page margins for Word How to set page margins for Word Mar 19, 2024 pm 10:00 PM

Among office software, Word is one of our most commonly used software. The text documents we produce are generally operated with Word. Some documents need to be submitted in paper version as required. Before printing, the layout must be set before it can be presented. produce better results. So the question is, how do you set page margins in Word? We have specific course explanations to help you solve your doubts. 1. Open or create a new word document and click the &quot;Page Layout&quot; menu on the menu bar. 2. Click the &quot;Margins&quot; button of the &quot;Page Setup&quot; option. 3. Select a commonly used page margin in the list. 4. If there are no suitable margins in the list, click &quot;Custom Margins&quot;. 5. The &quot;Page Setup&quot; dialog box pops up, enter the &quot;Margins&quot; option respectively.

How to draw a table in Word How to draw a table in Word Mar 19, 2024 pm 11:50 PM

Word is a very powerful office software. Compared with WPS, Word has more advantages in detail processing. Especially when the document description is too complex, it is generally more worry-free to use Word. Therefore, when you enter the society, you must learn some tips on using word. Some time ago, my cousin asked me a question like this. I often see other people drawing tables when using Word, and I feel very high-level. I laughed at that time. It seemed like high-level content, but actually it only took 3 steps to operate. Do you know how to draw a table in Word? 1. Open word, select the place where you want to insert the table, and find the &quot;Insert&quot; option in the upper menu bar. 2. Click the &quot;Table&quot; option, and densely packed small cubes will appear.

Where is the shading setting in word? Where is the shading setting in word? Mar 20, 2024 am 08:16 AM

We often use word for office work, but do you know where the shading settings are in word? Today I will share with you the specific operation steps. Come and take a look, friends! 1. First, open the word document, select a paragraph of text paragraph information that needs to be added with shading, then click the [Start] button on the toolbar, find the paragraph area, and click the drop-down button on the right (as shown in the red circle in the figure below) ). 2. After clicking the drop-down box button, in the pop-up menu options, click the [Border and Shading] option (as shown in the red circle in the figure below). 3. In the pop-up [Border and Shading] dialog box, click the [Shading] option (as shown in the red circle in the figure below). 4. In the filled column, select a color

How to draw a dotted line in word How to draw a dotted line in word Mar 19, 2024 pm 10:25 PM

Word is a software that we often use in our office. It has many functions that can facilitate our operations. For example, for a large article, we can use the search function inside to find out that a word in the full text is wrong, so we can directly replace it. Make changes one by one; when submitting the document to your superiors, you can beautify the document to make it look better, etc. Below, the editor will share with you the steps on how to draw a dotted line in Word. Let's learn together! 1. First, we open the word document on the computer, as shown in the figure below: 2. Then, enter a string of text in the document, as shown in the red circle in the figure below: 3. Next, press and hold [ctrl+A] Select all the text, as shown in the red circle in the figure below: 4. Click [Start] on the top of the menu bar

How to underline in word How to underline in word Mar 19, 2024 pm 10:49 PM

When you make a graduation thesis or resume cover, you will write your gender, age, class and other information on the cover, and draw a line behind it and write your own information. Then it involves the issue of underlining the name. That is what everyone is asking about how to underline in word. Below I will share with you the specific steps. Come and learn! First, open the document on your computer, click the [Start] button on the top toolbar of Word, and then click the underlined icon button under the letter [U], as shown in the red circle in the figure below. 2. Then, place the cursor where you want to underline, and then press the space bar on the keyboard. At this time, the underline will appear. The length of the underline can be controlled according to the number of spaces, as shown in the red circle in the figure below

See all articles