adsense728x90


reactjs video tutorials Web frontend



https://www.safaribooksonline.com/search/?query=reactjs&sort=relevance&formats=video&highlight=true&is_academic_institution_account=false&extended_publisher_data=true&include_orioles=true&source=user
trial version으로 보던가



reactjs를 좀 알면, redux에 대해서 공부하면서 reactjs를 익힐 수도 있다.

find에 Permission denied 결과 안 나오게 하기



find . ! -readable -prune
find . ! -perm -g+r,u+r,o+r -prune
find . 2>/dev/null > files_and_folders




Question Answering PPP-QuestionParsing-Grammatical 실행해보기 AI

Open source Question answering framework

PPP-QuestionParsing-Grammatical

Question Parsing module for the PPP using a grammatical approch

Updated on Mar 29




설치하려고 시도하는데, 잘 안 되네.

virtualenv python=python3.5 pvenv
source pvenv/bin/activate

pip3 install git+https://github.com/ProjetPP/PPP-QuestionParsing-Grammatical.git



Ppp/PPP-QuestionParsing-Grammatical/demo$ python demo1.py 
Traceback (most recent call last):
  File "demo1.py", line 1, in <module>
    from corenlp import StanfordCoreNLP
ImportError: No module named 'corenlp'


pip install corenlp-python
설치한다.


You can install the main dependencies (especially CoreNLP) using the script file bootstrap_corenlp.sh fromhttps://github.com/ProjetPP/Scripts (clone the Scripts repository and run bash bootstrap_corenlp.sh).

라는데, Scripts repository에는 bootstrap_corenlp.sh가 없다.

에 설명이 있었다.

CORENLP="stanford-corenlp-full-2015-01-30" CORENLP_OPTIONS="-parse.flags \" -makeCopulaHead\"" python3 -m corenlp



demo를 실행시켜 보기 위해서
https://github.com/ProjetPP/PPP-QuestionParsing-Grammatical.git
를 git clone.

sibling으로 

/Scripts

도 git clone

stanford-corenlp-full-2015-01-30 를 받고 싶은데, 아직 못 찾겠다.

cd Scripts
wget http://nlp.stanford.edu/software/stanford-corenlp-full-2014-08-27.zip

CORENLP="stanford-corenlp-full-*" CORENLP_OPTIONS="-parse.flags \" -makeCopulaHead\"" python -m corenlp -H 0.0.0.0 -p 

8080 port로 실행 된다.

다른 terminal에서 source pvenv/bin/activate 하고
cd PPP-QuestionParsing-Grammatical/demo

corenlp directory나 port를 조금씩 고쳐가면서 demo1부터 실행.

python demo1.python 은 실행 됐다.

demo3.python에서 port를 8080로 고치기.

demo3가 json error가 나는 중. -_-

PPP-QuestionParsing-Grammatical/demo$ python3 demo3.py > demo.dot
Where is the capital of Belgium?
Traceback (most recent call last):
  File "demo3.py", line 29, in <module>
    print(get_tree())
  File "demo3.py", line 24, in get_tree
    result = nlp.parse(sentence)
  File "demo3.py", line 17, in parse
    result = r.json()['sentences'][0]
.../site-packages/requests/models.py", line 826, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib/python3.5/json/__init__.py", line 319, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.5/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.5/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

127.0.0.1 - - [23/Aug/2016 00:15:13] "POST /?properties=%7B%22annotators%22%3A+%22tokenize%2Cssplit%2Cpos%2Clemma%2Cner%2Cparse%22%2C+%22outputFormat%22%3A+%22json%22%2C+%22parse.flags%22%3A+%22+-makeCopulaHead%22%7D HTTP/1.1" 404 -


$ pip install jsonrpclib

했더니, 이제는 corenlp도 안 뜬다.

Ppp/Scripts$ CORENLP="stanford-corenlp-full-2014-08-27" CORENLP_OPTIONS="-parse.flags \" -makeCopulaHead\"" python3 -m corenlp -p 9000
Traceback (most recent call last):
  File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
    exec(code, run_globals)

    from jsonrpclib.SimpleJSONRPCServer import SimpleJSONRPCServer
ImportError: No module named 'jsonrpclib'




이어지는 내용

image data로부터 user rating을 예상하기 하고 싶은데 AI



Image item feature àItem feature from Rating (user like data)

Regression model을 DNN으로 만들어서, image가 각 user에게 어떻게 평가 받을 지 예상하기

 

Image, Rating datafeaturedimensionality reduction해서 쓰기

Image à Image feature (auto encoder)

Item features ß Ratings (ALS)

http://spark.apache.org/docs/latest/mllib-collaborative-filtering.html

 

item에 대해 서로 다른 data로부터 뽑은 feature간 변환을 해주는 modelDNN으로 만드는 게 가능한가?

feature A --> feature B

Image captioning같은 거라고 보면 되나?




spark로 mongodb에 data 넣기 Scala


spark-mongodb 를 쓰니까 serialization까지 잘 됐다.

<dependency>
<groupId>com.stratio.datasource</groupId>
<artifactId>spark-mongodb_2.10</artifactId>
<version>0.11.0</version>
</dependency>

transaction 같은 거 좀 걱정이긴 하다.

내부에서 

가 아니라 casbah를 쓰고 있다는 점이 조금 맘에 안 든다.
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>casbah-commons_${scala.binary.version}</artifactId>
<version>${casbah.version}</version>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>casbah-query_${scala.binary.version}</artifactId>
<version>${casbah.version}</version>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>casbah-core_${scala.binary.version}</artifactId>
<version>${casbah.version}</version>
</dependency>
casbah를 직접 쓰기


DateTime 쓸 땐

import com.mongodb.casbah.conversions.scala._DeregisterConversionHelpers()RegisterConversionHelpers()





1 2 3 4 5 6 7 8 9 10 다음