Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor elements #57

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Refactor elements #57

wants to merge 5 commits into from

Conversation

SoluMilken
Copy link
Contributor

@SoluMilken SoluMilken commented Jan 11, 2019

  1. Split uttut/elements.pyx into three scripts (datum.pyx, intent.pyx, entity.pyx) and move them into an independent folder elements/ .
  2. Add header files (*.pxd) for datum, intent, entity in order to cimport.

@codecov-io
Copy link

codecov-io commented Jan 11, 2019

Codecov Report

Merging #57 into master will increase coverage by 0.78%.
The diff coverage is 78.94%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #57      +/-   ##
==========================================
+ Coverage      97%   97.79%   +0.78%     
==========================================
  Files          52       54       +2     
  Lines        1471     1452      -19     
  Branches      154      153       -1     
==========================================
- Hits         1427     1420       -7     
+ Misses         37       25      -12     
  Partials        7        7
Impacted Files Coverage Δ
uttut/elements/exceptions.py 100% <ø> (ø)
uttut/expand_by_entities.pyx 97.77% <100%> (ø) ⬆️
uttut/entity_overlapping_ratio.py 100% <100%> (ø) ⬆️
uttut/elements/utils.pyx 84.61% <33.33%> (ø)
uttut/elements/intent.pyx 62.5% <62.5%> (ø)
uttut/elements/datum.pyx 76.92% <76.92%> (ø)
uttut/elements/entity.pyx 90% <90%> (ø)
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9a40735...7cbd579. Read the comment docs.

@SoluMilken SoluMilken changed the title [WIP] Not READY YET [WIP] Refactor elements (先不要理我) Jan 11, 2019
@SoluMilken SoluMilken changed the title [WIP] Refactor elements (先不要理我) Refactor elements Jan 31, 2019
cdef class Datum: # noqa: E999

cdef public str utterance
cdef public object intents
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

應該是 list ...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


cdef public str utterance
cdef public object intents
cdef public object entities
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

list

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

object intents=None, # : List[Intent] = None,
object entities=None, # : List[Entity] = None,
):
self.utterance = utterance
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cdef Entity entity, next_entity
cdef unsigned int idx

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants