[ת]ʹÓÃpythonµ÷ÓüÆËãËù·Ö´Ê
·¢ÐÅÈË: TRAD (GFans), ÐÅÇø: NLP
±ê Ìâ: Ô´´£ºÊ¹ÓÃpythonµ÷ÓüÆËãËù·Ö´Ê
·¢ÐÅÕ¾: ˮľÉçÇø (Mon Nov 23 13:30:46 2009), Õ¾ÄÚ
´úÂëºÜ¼òµ¥£¬µ«ÎÒ×Ô¼ºÃþË÷ÁËÒ»ÏÂÎç,·¢³öÀ´¹²ÏíÒ»ÏÂ
°ÑÕâ¸öÎļþͬICTALAS30.DLL £¬DATAÎļþ¼Ð£¬Configure.xm l·ÅÔÚͬһ¸öĿ¼Ï¼´¿É¡£
python´úÂë
#coding:gb2312
from ctypes import *
dll=cdll.LoadLibrary("ICTCLAS30.dll")
dll.ICTCLAS_Init(c_char_p("."))
lpText = u"¼ÆËãËùººÓï´Ê·¨·ÖÎöϵͳICTCLASµ÷ÓòâÊÔ"
bSuccess = dll.ICTCLAS_ParagraphProcess(c_char_p(lpText), 1)
print c_char_p(bSuccess).value,lpText
dll.ICTCLAS_Exit()
--
¡ù À´Ô´:·Ë®Ä¾ÉçÇø http://newsmth.net·[from: 203.86.35.*]
Ïà¹ØÎĵµ£º
import Queue, threading, sys
from threading import Thread
import time,urllib
# working thread
class Worker(Thread):
worker_count = 0
def __init__( self, workQueue, resultQueue, timeout = 0, **kwds):
Thread.__init__( self, **kwds ) ......
Documentation for C's fopen():
---
r Open text file for reading. The stream is positioned at the beginning
of the file.
r+ Open for reading and writing. The stream is positioned at the
beginning of the file.
w Truncate file to zero length or create text file for writing. The
stream is posi ......
À´Ô´£º ×÷Õߣºzhaoweikid ·¢²¼Ê±¼ä£º2007-07-04 ÔĶÁ´ÎÊý£º
pythonµÄpoplibÄ£¿éÊÇÓÃÀ´´Ópop3ÊÕÈ¡ÓʼþµÄ£¬Ò²¿ÉÒÔ˵ËüÊÇ´¦ÀíÓʼþµÄµÚÒ»²½¡£
POP3ÐÒé²¢²»¸´ÔÓ£¬ËüÒ²ÊDzÉÓõÄÒ»ÎÊÒ»´ðʽµÄ·½Ê½£¬ÄãÏò·þÎñÆ÷·¢ËÍÒ»¸öÃüÁ·þÎñÆ÷±ØÈ»»á»Ø¸´Ò»¸öÐÅÏ¢¡£pop3ÃüÁîÂëÈçÏ£º
¡¡ÃüÁ ......
¹ØÓÚPython³ÌÐòµÄÔËÐУ¬Æäʵһ¸öPython³ÌÐò¾ÍÏ൱ÓÚÒ»¸öÓ¦ÓóÌÐò£¬Ëü²»ÐèÒª¾¹ý±àÒ룬ֻÐèÒªÓû§µçÄÔÉÏÃæ°²×°Python»·¾³¼´¿É¡£ÒªÔËÐÐÒ»¸öpy³ÌÐò£¬Ö±½ÓË«»÷Õâ¸öpyÎļþ¼´¿É¡£Ò»°ãÇé¿öÏ£¬Ã»ÓÐÌáʾÓû§ÊäÈë»ò¿ØÖÆÆÁÄ»ÏÔʾ£¬´ò¿ªÒ»¸öpyÎļþʱ»áͻȻÉÁÒ»ÏÂÂíÉϾÍÍ˳ö£¬ÕâÊÇÓÉÓÚ³ÌÐòÔËÐÐÒѾÍê³ÉÁË¡£ÈôÐèÒªÏÔʾ£¬ÔòÒªÌí¼ÓÒ» ......