Skip to content

Commit

Permalink
Clean up sentiment analysis code
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Sokolov committed Apr 23, 2019
1 parent caa2f40 commit 43e294e
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 2 deletions.
20 changes: 20 additions & 0 deletions SentimentAnalysis/data.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
# coding: utf-8

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

# pylint: disable=
import time
import multiprocessing as mp

Expand Down
3 changes: 1 addition & 2 deletions SentimentAnalysis/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@
# under the License.

# pylint: disable=
"""Main file to run training of sentiment analysis code on NLPCC 2018 bilingual data."""
from gluonnlp.model import ConvolutionalEncoder
from mxnet import gluon


class TemplatedSentimentNet(gluon.Block):
"""Network for sentiment analysis."""

Expand Down
20 changes: 20 additions & 0 deletions SentimentAnalysis/train.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
# coding: utf-8

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

# pylint: disable=
import time
import numpy as np
import warnings
Expand Down
20 changes: 20 additions & 0 deletions SentimentAnalysis/utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
# coding: utf-8

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

# pylint: disable=
import argparse


Expand Down

0 comments on commit 43e294e

Please sign in to comment.