This repository has been archived by the owner on Nov 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* correctly formatted models to data classes * updated model Names and added new phrases * #49 dependency extraction function unit tests * style: apply automatic fixes of linters * fix: possible fix for build error * added json dump of dependencies to CLI flow * mypy fix * style: apply automatic fixes of linters * do the versions make a difference on dependency understanding? * updated url for spacy langauge module * quick fix, need to work on punctuation extraction * removed hanging punctuation when extracting actions * style: apply automatic fixes of linters * test for dependency extraction class subordinating_conjuction * style: apply automatic fixes of linters * more documentation for functions * style: apply automatic fixes of linters * updated ontology to represent current code state * removed pattern without implemented function for now * added dependency README Co-authored-by: Aleksandr Sergeev <[email protected]> Co-authored-by: aserge16 <[email protected]> Co-authored-by: Lars Reimann <[email protected]>
- Loading branch information
1 parent
3278c4d
commit 60fc290
Showing
9 changed files
with
257 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
package_parser/package_parser/commands/get_dependencies/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Dependency Extaction | ||
|
||
## How do we imagine a Dependency | ||
|
||
A basic parameter dependency, what we are in this lab handling, is contained within a single sentence. In this sentence, we expect the identifying name of another parameter in the same function to appear, specifically in the dependency subtree of the condition. | ||
|
||
|
||
## How do we extract a Dependency | ||
|
||
Relying on spaCy's DependencyMatcher, we write functions to detect the head token of both the action and condition dependency subtrees. We assume that the action is always the root of the sentence, and a subtree inside the action contains the condition text. | ||
|
||
Phrases are used to identify the type of the action/condition and create the appropriate model object. | ||
|
||
Parsing a dependency subtree in an InOrder traversal, we can rebuild a sentence from the spaCy token objects. | ||
|
||
|
||
### Dependency Tree Example | ||
|
||
![Alt text](dependency_tree_example.png "Dependency Tree Example") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+38.6 KB
...age_parser/package_parser/commands/get_dependencies/dependency_tree_example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.