Subir archivos a ''
parent
d5352ca053
commit
6923285bfc
@ -0,0 +1,13 @@
|
||||
import wordsegment
|
||||
from wordsegment import load, segment
|
||||
from flask import Flask, json, request
|
||||
load()
|
||||
|
||||
api = Flask(__name__)
|
||||
|
||||
@api.route('/domain/<string:name>', methods=['GET'])
|
||||
def get_words(name: str):
|
||||
return json.dumps(segment(name))
|
||||
|
||||
if __name__ == '__main__':
|
||||
api.run()
|
Loading…
Reference in New Issue